getName will return the name of the object that belongs to the peer
you called doSelect on.

$articles = ArticlePeer::doSelectJoinCategory(new Criteria());
foreach ($articles as $article) {
  echo $article->getName(); //echoes the name of the article
  echo $article->getCategory()->getName(); //echoes the name of the category
}

This works if you have the relation correctly set up in your schema.

On Fri, Sep 10, 2010 at 02:24, Vecsei <[email protected]> wrote:
>  Hello,
>
> when Im doing a left join and now there are two columns with the same name:
> For Example:
>
> Table:
> Category
> Column: Name
> Table:
> Articles
> Column: Name
>
> Now there is "Name" twice.
>
> How do I call the different "Name"-Columns?
> getName() wouldnt work for both :D :D
>
> Thanks for your help
> Regards
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to [email protected]
> 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
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
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