You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When using expr, unless you have a single table find() or a query builder with an alias, you can hit ambiguous column errors due to the lack of column prefixing. Eg: self-referential eager joins
Describe the solution you'd like
Expand expr to support passing a function like so:
expr((alias)=>`lower(${alias}.column)`)
alternatively, perhaps we can add the ability to define the alias within find methods
The text was updated successfully, but these errors were encountered:
How do you expect that to work? expr is just an identity function, it needs to return string as it will be used as an object key. It also does not have any context so it would have to use global one?
Maybe we could instead have some known substring we would replace, maybe something like [::alias::] or even ${alias} as an escaped string. In the end we could use it automatically if we see a function in the argument.
Is your feature request related to a problem? Please describe.
When using expr, unless you have a single table
find()
or a query builder with an alias, you can hit ambiguous column errors due to the lack of column prefixing. Eg: self-referential eager joinsDescribe the solution you'd like
Expand expr to support passing a function like so:
alternatively, perhaps we can add the ability to define the alias within find methods
The text was updated successfully, but these errors were encountered: