Hey everyone,

I have the following code in a Peer method:

   $criteria->clearSelectColumns();

   self::addSelectColumns($criteria);
   sfGuardUserPeer::addSelectColumns($criteria);
   TableAdamPeer::addSelectColumns($criteria);
   TableBartPeer::addSelectColumns($criteria);
   TableClaricePeer::addSelectColumns($criteria);
   TableDavidPeer::addSelectColumns($criteria);
   TableInQuestionPeer::addSelectColumns($criteria);

   $criteria->addJoin(self::TABLE_ADAM_ID, TableAdamPeer::ID);
   $criteria->addJoin(TableAdamPeer::TABLE_BART_ID, TableBartPeer::ID);
   $criteria->addJoin(TableAdamPeer::TABLE_DAVID_ID,  
TableDavidPeer::ID);
   $criteria->addJoin(TableBartPeer::TABLE_CLARICE_ID,  
TableClaricePeer::ID);
   $criteria->addJoin(self::OWNER_ID, sfGuardUserPeer::ID);
   $criteria->addJoin(self::TABLE_IN_QUESTION_ID,  
TableInQuestionPeer::ID, Criteria::LEFT_JOIN);

The SQL that results from this keeps putting the LEFT JOIN with  
table_in_question after the last table in the FROM statement  
(sf_guard_user), which causes PostgreSQL to throw an error.
I'd expect it to appear as:

"FROM self LEFT JOIN table_in_question ON (self.table_in_question_id  
= table_in_question.id), table_adam, table_bart, table_clarice,  
table_david, sf_guard_user ..."

Instead what I'm getting is:

"FROM self, table_adam, table_bart, table_clarice, table_david,  
sf_guard_user LEFT JOIN ..."

I tried moving the addJoin() statement in question around, but that  
doesn't change anything...

Any pointers would be much appreciated. :)

Cheers,


Alexander




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to