开发者

Limit Clause While Fetching Child Records in Doctrine

开发者 https://www.devze.com 2023-01-26 08:09 出处:网络
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

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

精彩评论

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

关注公众号