Doctrine Inheritance: find all children of a table

375 views Asked by At

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 NotificationLike, 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

There are 0 answers