dslevine wrote:
If you want to get Hibernate to grab all three in one query, I think you can add "outer-join='true'" to the XML mapping file, and hibernate will fetch the associated properties when it fetches the main object. Did this not work?
No, that doesn't work.
Hibernate just can't fetch it with one SELECT under the following circumstances:
* Polymorphism
* Two bidirectional 1:1 associations to objects that are mapped in the same table
* The 1:1 associations aren't mandatory
It's no problem to fetch these things with SQL, but Hibernate just doesn't do it.
I think I'll have to go with JDBC.
I agree that Hibernate's polymorphism support is very limited (not because of a bad implementation, but because the proxying thing just can't handle it, this it a theoretical limitation).