开发者

Doctrine override relation accessor

开发者 https://www.devze.com 2022-12-18 21:48 出处:网络
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:

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

精彩评论

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