Hi Thomas,
Why don't you just query the comments independently of the blog article?
$comments = Doctrine_Query::create()
->from('Comment c')
->where('c.article_id = ?', $yourArticleId)
->orderBy('c.created_at DESC')
->execute();
If you put this code in the CommentTable you really don't have much
code left in your action:
$this->comments = CommentTable::findByArticle($article->id);
Bernhard
On Mon, Sep 22, 2008 at 5:40 PM, Thomas Rabaix <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> In propel it is possible to provide a Criteria objet when fetching
> relations. This can be used to fetch, for instance, all blog comments
> ordered by date.
>
> How can we achieve this with doctrine ?
>
> I quickly look to the code and maybe the
> Doctrine_Relation::fetchRelatedFor should get a second parameter with
> a Query Object and the Doctrine_Record::_get a third Query argument .
>
> --
> Thomas Rabaix
> Internet Consultant
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---