开发者

Limit Clause While Fetching Child Records in Doctrine

I have two tables Entity and Message. as each entity can have many messages so it's like parent child relation. I dont want to use doctrine custom query so I am loading entity message like

$this->currentUser = Doctrine_Core::getTable('Entity')->find($entityID);

and then "$currentUser->getMessage()" gives me all messages of that person.

So is there any way to get only few message? let's say 3 message only? How can I use LIMIT claue in this case?

Th开发者_StackOverflowanks

Ali

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜