aspose file tools
The moose likes Object Relational Mapping and the fly likes Limiting outer joins in hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "Limiting outer joins in hibernate" Watch "Limiting outer joins in hibernate" New topic
Author

Limiting outer joins in hibernate

Tom Bigbee
Greenhorn

Joined: Sep 16, 2002
Posts: 19
Supposedly you are supposed to be able to limit the number of outer joins performed on a joined inheritance strategy. I'm trying to make a pattern where I can have an unlimited number of subtype tables

Pages 209-210 of the Book: Java Persistence with Hibernate, specifies that some RDBMs limit the number of tables in the outer joins, it goes on to show you how to do this with an xml mapping file using the <subclass> <join> and <join table> tags

the book then goes on to specify that Java Persistence also supports this mixed inheritance mapping strategy with annotations.

I'm using annotations, and can't seem to limit the outer joins

I've tried @Inheritance(strategy = InheritanceType. ( SINGLE_TABLE and JOINED ) on the SuperClass

I've tried specifying the @Column(table = (on the columns)

I've also tried @Table and SecondaryTable on the SubClasses




In both cases the Left out joins are are performed...



My question is - How do I limit the outer joins using annotations?

Thanks, in advance for your assistance
[ January 30, 2007: Message edited by: Tom Bigbee ]

Thomas Bigbee - SCJP, SCJD, SCWCD
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Limiting outer joins in hibernate
 
Similar Threads
Join using Hibernate
joined-subclass problem
Content based discrimination with Hibernate annotations
Hibernate generated query for a inheritance mapping
Hibernate @DiscriminatorColumn