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
There is currently no way to remove an alias with aliasOverride in simpleClause. This is useful in cases where I do some augmenting on the field name like query.eq('LOWER(name)', $name). If I am using this clause in a CustomClauseQuery that joins with another table and has specified an alias, there is no way to remove that alias for this clause. It ends up compiling to alias.LOWER(name) = $1. I can get around this by specifying fieldAlias in loadEntOptions and then manually setting the tableName to 'table_name alias'. Kinda hacky but technically works fine.
I'm suggesting changing the overrideAlias definition from overrideAlias?: string to overrideAlias?: string | null. The other solution I thought of was something like a new parameter that would wrap column names. So it would be something like query.Eq('name', $name, { columnOp: 'LOWER' }).
The text was updated successfully, but these errors were encountered:
There is currently no way to remove an alias with
aliasOverride
in simpleClause. This is useful in cases where I do some augmenting on the field name likequery.eq('LOWER(name)', $name)
. If I am using this clause in aCustomClauseQuery
that joins with another table and has specified analias
, there is no way to remove that alias for this clause. It ends up compiling toalias.LOWER(name) = $1
. I can get around this by specifyingfieldAlias
inloadEntOptions
and then manually setting thetableName
to'table_name alias'
. Kinda hacky but technically works fine.I'm suggesting changing the
overrideAlias
definition fromoverrideAlias?: string
tooverrideAlias?: string | null
. The other solution I thought of was something like a new parameter that would wrap column names. So it would be something likequery.Eq('name', $name, { columnOp: 'LOWER' })
.The text was updated successfully, but these errors were encountered: