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
and was wondering whether we could have alias possibilities in the Filter functionality to enable us use Authorize or any other fllter feature without deeper customizations
@Authorize({authorize: (context: UserContext)=>({or:[{apartment: {"owner as apartment_owner": {"agents as apartment_agents": {agentId: {eq: context.req.user.id}}}}},{"owner as house_owner": {"agents as house_agents": {agentId: {eq: context.req.user.id}}}},]}asunknown)})
The result would be to generate an SQL statement with a custom alias and ideally prevent multiple aliases when filtering with same entities and help alleviate the "Alias" issue reducing the workload for revamping whole modules
In cases one would need to use custom alias for all SQL statements generated through filter. You can specify the alias as part of the filter tags as below
What is the motivation / use case for changing the behavior?
Having multiple entities that share a third entity. Example; Either a house or an apartment can have an owner, while trying to filter owner house relationship one faces the error below. ERROR [ExceptionsHandler] ER_NONUNIQ_TABLE: Not unique table/alias: 'owner'
The text was updated successfully, but these errors were encountered:
Is there an existing issue that is already proposing this?
Is your feature request related to a problem? Please describe it
I have an issue when trying to filter nested columns in the @authorize decorator.
and was wondering whether we could have alias possibilities in the Filter functionality to enable us use Authorize or any other fllter feature without deeper customizations
Describe the solution you'd like
A solution would be
OR
OR
The result would be to generate an SQL statement with a custom alias and ideally prevent multiple aliases when filtering with same entities and help alleviate the "Alias" issue reducing the workload for revamping whole modules
Teachability, documentation, adoption, migration strategy
In cases one would need to use custom alias for all SQL statements generated through filter. You can specify the alias as part of the filter tags as below
OR
you can as well add alias in the JoinColumn for your entity
What is the motivation / use case for changing the behavior?
Having multiple entities that share a third entity. Example; Either a house or an apartment can have an owner, while trying to filter owner house relationship one faces the error below.
ERROR [ExceptionsHandler] ER_NONUNIQ_TABLE: Not unique table/alias: 'owner'
The text was updated successfully, but these errors were encountered: