Is it possible to write the following statement using standard propel? select distinct document.id, document.document_name, document.document_description from document left join (document_tag left join tag on document_tag.tag_id = tag.id ) on document.id = document_tag.document_id
I tried something like this, on the DocumentPeer.class.php: $c = new Criteria(); $c->setDistinct(); $c->addJoin(self::ID, DocumentTagPeer::DOCUMENT_ID, Criteria::LEFT_JOIN); $c->addJoin(DocumentTagPeer::TAG_ID, TagPeer::ID, Criteria::LEFT_JOIN); return self::doSelect($c); The problem is that the 2nd join must be between document_tag and tag tables. Regards, Radu.
-- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.