How to make a nested query with an Entity that doesn't really exist (many-to-many)
- by Calou
Hi everyone,
I'm new with Doctrine2 so my question can be easy to answer (I hope so).
First of all, here the SQL query that I'd want :
SELECT *
FROM Document
WHERE id NOT IN (SELECT document_id FROM Documents_Folders)
Pretty simple isn't it ? The porblem is that my table 'Documents_Folders' is not an entity. In fact, it was create because I have a many-to-many relation between my entities 'Document' and 'Folder'.
I tried several queries, but none worked.
Thanks.