So I have 3 entities within one table. I need to be able to search 2 out of the 3 entities in one select statement, but I’m not sure how to do this.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the
INSTANCE OFoperator in your dql query like this (whereUseris your base class):Doctrine translates this in the sql query in a
WHERE user.type = '...'condition.See here for more details on the dql query syntax.