Unsupported expression in Elixir.AshPostgres.SqlImplementation query: `datetime_add`
Can't quite tell what I'm doing wrong here.
The
OrgSubscription is a many_to_many resource that connects Organization to SubscriptionPlan.
In SubscriptionPlan, the duration_qty and duration_interval attributes are defined like so:
When I try to run the calculation, I get this error:
3 Replies
Hmm...I don't think that expression supports references as the amount/duration? Or maybe it's a bug there?
Solution
You may need to use a fragment
Fragment worked! Claude did me a solid: