Inheritance 原则继承:查找表的所有子级

Inheritance 原则继承:查找表的所有子级,inheritance,doctrine,concrete-inheritance,Inheritance,Doctrine,Concrete Inheritance,我对学说中的表继承有一个问题。例如,我将使用3个表: Notification: columns: id is_viewed NotificationLike: columns: like_id inheritance: { type: concrete, extends: Notification } NotificationComment: columns: comment_id inheritance: { type: concret

我对学说中的表继承有一个问题。例如,我将使用3个表:

Notification:
  columns:
    id
    is_viewed

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

NotificationComment:
  columns:
    comment_id
  inheritance: { type: concrete, extends: Notification }
如您所见,有一个父表
Notification
和两个子表
NotificationLike
NotificationComment
,它们使用具体继承来扩展父表

我想得到所有的通知。没有某种形式的加入,我怎么能做到呢

如果我尝试
doctor\u Core::getTable('Notification')->findAll()
我会得到0条记录


有什么想法吗?

嗯……奇怪。我从未做过具体的继承,但对于单表继承,它肯定是有效的。也应该和混凝土一起工作。可能通知类被标记为抽象类,不能有任何实例。只是猜测一下,每个子类都必须有一个引用父类id的FK id?