Doctrine ORM中的类表继承

Can someone please explain to me how Doctrine 2 ORM handles class table inheritance at the SQL level?

I can't seem to find any mention in the documentation of what strategy is used in terms of SQL queries to pull jagged result sets.

For example:

  • Table parent is the "parent class" table.
  • Table child1 is a "child class" table.
  • Table child2 is another "child class" table.

What query(queries?) does Doctrine produce when I try to pull all children? Is this even possible? To be a little more clear, the result set I would be expecting would be comprised of rows from all 3 tables, and instantiate objects of both Child1 and Child2 types.

After a lot of digging I found the place where the sql to select entities is generated. The specific result sql depends on the platform and the criteria. From that place on you can dig further to find out what you need in specific.

BasicPersister