calculation argument does not support expressions
I'm trying to build a calculation on a user resource that looks something like this:
Where
As it currently stands, this breaks on
This seems like a fundamental limitation of expressions/calculations, but I'm wondering if anyone has any tips for working around this? Preferably without having to replicate my
although I'm starting to think that might be the only way to approach this
Where
manages_user is a calculation containiung some complex expression logic I'd really like to avoid replicating in raw ecto if possible.As it currently stands, this breaks on
manages_user(user_id: parent(id)) with an error Invalid value provided for calculation argument user_id in manages_user: does not support expressions.This seems like a fundamental limitation of expressions/calculations, but I'm wondering if anyone has any tips for working around this? Preferably without having to replicate my
manages_user calculation logic in raw ecto 
Ash