Mapping class inheritance Figure 5.4 Breaking out a subclass to its own secondary table You can also use the trick for other subclasses in your class hierarchy. However, if you have an exceptionally wide class hierarchy, the outer join can become a problem. Some database systems (Oracle, for example) limit the number of tables in an outer join operation. For a wide hierarchy, you may want to switch to a different fetching strategy that executes an immediate second select instead of an outer join: … Java Persistence also supports this mixed inheritance mapping strategy with annotations. Map the superclass BillingDetails with InheritanceType.SINGLE_ TABLE, as you did before. Now map the subclass you want to break out of the single table to a secondary table. @Entity @DiscriminatorValue(”CC”) @SecondaryTable(
We highly recommend you visit web and email hosting services if you need stable and cheap web hosting platform for your web applications.
This entry was posted
on Thursday, December 27th, 2007 at 1:15 pm and is filed under PHP5.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.