Pro |
 |
Joined: Wed Nov 05, 2003 7:22 pm Posts: 211
|
I know there has been a lot of discussion about why Hibernate needs to outer join all tables in a joined subclass inheritance hierarchy if you query the base class.
However, Hibernate also outer join queries the parent table if you retrieve the actual Object.
E.g. public class Animal
public class Cat extends Animal
select max(id) from Cat results in select max(cat0_.id) as col_0_0_ from Animal animal0_ left outer join Cat cat0_ on animal0_.id=cat0_.id where animal0_.DTYPE='CAT';
Now it makes sense that the two tables are joined. What doesn't make sense is that it is a left outer join in stead of an inner join.
Marc
|
|