开发者

Doctrine Inheritance: find all children of a table

I have a question about Table Inheritance in Doctrine. for an example I'll use 3 tables:

Notification:
  columns:
    id
    is_viewed

NotificationLike:
  columns:
    like_id
  inheritance: { type: concrete, extends: Notification }

NotificationComment:
  columns:
    comment_id
  inheritance: { type: concrete, extends: Notification }

As you can see, there is a parent table Notification and two child tables Notificati开发者_JAVA技巧onLike, NotificationComment that use concrete inheritance to extend the parent table.

I want to get all the Notifications. how can i do it without some kind of JOIN?

If i try Doctrine_Core::getTable('Notification')->findAll() i get 0 records.

Any ideas?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜