crud
crud copied to clipboard
Left join entity relation with on condition
Is there any way to configure CRUD or CrudRequest for executing query like:
select * from table1 left join "someRelation" on table1.id = "someRelation".table1ID AND "someRelation"."field1" = 99
Data in query is dumb, just for example.
Maybe there is some workarounds to solve this.
I need this too, also referred here #98
Also need this.
For example, the deletedAt AND is automatically added, because I use the softDelete: true option, but I need additional conditions.
LEFT JOIN `locations` `location` ON `location`.`messageId` = `messages`.`id` AND (`location`.`deletedAt` IS NULL)
What I need, additional conditions:
LEFT JOIN `locations` `location` ON `location`.`messageId` = `messages`.`id` AND (`location`.`deletedAt` IS NULL) AND (`location`.`userId` = 1337)
Bump