I'm using Symfony 1.4 + Doctrine 1.1.
I have a schema with a one-to-many relation.
Let's say A has many B, I ask for all the B's of A as follow:
开发者_开发知识库$a->b
This returns a Doctrine_Collection
.
What I want is a way to tell Doctrine to give me all the B's of A sorted by a particular attribute of B.
I don't want to re-write the query, I just want to tell the accessor getBs()
to sort as I wanted.
Is this possible? any idea?
精彩评论