Zend + Doctrine Error on Table relationship-Collection of common programming errors
what is the best practice of joining table (left join) syntax in doctrine?
I have this code:
$userTable = Doctrine_Core::getTable('Application_Model_User');
$q = Doctrine_Query::create()
->select('u.*')
->from('Application_Model_User2 u')
->leftJoin('u.Application_Model_User2 p');
echo $q->getSqlQuery();
but what I get is this error:
Message: Unknown relation alias Application_Model_User2
PS: Application_Model_User and Application_Model_User2 extends the generated model by the doctrine.
Does someone have any idea with regards to this error?
Originally posted 2013-11-10 00:16:59.