Hi, i have this entity: Category----->---OneToMany--->Subcategory----->ManyToMany----->Product
I have to find the products that have the subcategory 1 and 3 Use the following query SELECT p FROM Module\Entity\Product p JOIN p.subcategories s WHERE s.id =1 AND s.id = 3 but I get 0 results. if i use the following query SELECT p FROM Module\Entity\Product p JOIN p.subcategories s WHERE s.id IN ( 1, 3 ) I find all the products you have 1 OR 3 but I have to find products that have both 1 and 3 where am I wrong? -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/groups/opt_out.
