twenty icon indicating copy to clipboard operation
twenty copied to clipboard

Fix mutations with camelCase table names

Open Weiko opened this issue 3 months ago • 0 comments

Context

Some mutations are not working properly, workspaceMember soft deletion for example. workspaceMember being a camelCase table name, it's probably not propagated properly to pgql (which needs double quote for the table name to keep it as camelCase)

I didn't have time to dig too much but if the where is before softDelete, the query is WHERE workspaceMember.id = $1 while if it's after, the query becomes WHERE id = $1. Probably due to the fact that once you call delete/softDelete/update, the standard builder (SelectQueryBuilder) becomes a DeleteQueryBuilder/etc... and filters are not handled the same way.

Weiko avatar Nov 25 '24 17:11 Weiko