Hibernate 3.2.5 - Postgres 8.2.x
I have a basic hierarchy
Class A {
Name;
...
}
Class B extends A
{
...
}
Class C extends B
{
...
}
And a class that holds the reference to a set of C's.
Class Foo
{
Set<C> items;
}
C -> A are mapped as joined subclass and work fine, Items is mapped by a set with one-to-many. However when I try to add an order to the set I ran into a problem. I would like to order on the name property, inherited through B -> C. This crashes with a SQL exception, column not found. The generated SQL is trying to reference the table for C, not A. Now if I set the order-by value to `C0_2_.name asc` it works as expected. Obviously this is not a good solution. Does anyone have any suggestions on this?
Thanks!
|