开发者

Doctrine override relation accessor

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜