gloeglm wrote:
How does the generated SQL look like, and what is mysql complaining about?
I had the SQL in the original post:
(1) Translated SQL sth like: "select * from Resource where (select count(*) from ResourceUsers where Resource.id=ResourceUsers.resource_id)=0"
MySQL complains: syntax error near "select count(*) from ResourceUsers where..."
(2) Translated SQL sth like: "select * from Resource where not exists(select ResourceUsers.resource_id from ResourceUsers where Resource.id=ResourceUsers.resource_id)"
MySQL complains: syntax error near "exists(select ResourceUsers.resource_id ..."