I was searching Doctrine equivalent of inner join, and found following 
solutions:


 Using* QueryBuilder*:

*$qb->select('c')
    ->innerJoin('c.phones', 'p', 'WITH', 'p.phone = :phone')
    ->where('c.username = :username');*


Using *DQL*:

$query = $em->createQuery(*"SELECT u FROM User u JOIN u.address a WHERE 
a.city = 'Berlin'"*);

Is there any other way to implement inner join in Doctrine? Considering 
table as the Map concept in Java where primary key will be *key *and rest 
of the attributes as *list of objects, *is it possible join two tables? I 
would like to use *EntityManager->find* *function if possible.

In summary, is it possible to make *inner join *without DQL and 
QueryBuilder in Doctrine?

-- 
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/d/optout.

Reply via email to