Hello all,
I'm new to symfony, so be gentle :)

I have to tables:
users {id, name}
article{id, createdby_id, modifiedby_id}
createdby_id and modifiedby_id are foreign keys to users table

When i do:

$c = new Criteria();
$c->addJoin(ArticlePeer::CREATEDBY_ID, UsersPeer::ID);
$c->addJoin(ArticlePeer::MODIFIEDBY_ID, UsersPeer::ID);
$this->articleList = ArticlePeer::doSelect($c);

the resulting sql is:

SELECT article.ID, article. CREATEDBY_ID, article. MODIFIEDBY_ID FROM
article, users WHERE article. CREATEDBY_ID=users.ID AND article.
MODIFIEDBY_ID=users.ID

my question is: is there a way to make the sql look like this?

SELECT article.ID, article. CREATEDBY_ID, article. MODIFIEDBY_ID FROM
article, users u1, users u2 WHERE article. CREATEDBY_ID=u1.ID AND
article. MODIFIEDBY_ID=u2.ID

Thank you,
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-users@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to