|
Re: NullPointerException on combining inheritance strategies (table per class + joined) [message #537522 is a reply to message #537517] |
Wed, 02 June 2010 18:21 |
Gilberto Caetano de Andrade Messages: 45 Registered: July 2009 |
Member |
|
|
Hi, Ernesto!
Just one question: how can you combine these strategies?
Table per Class Hierarchy Strategy ==>In this strategy, all the classes in a hierarchy are mapped to a single table.
Joined Subclass Strategy ==>In the joined subclass strategy, the root of the class hierarchy is represented by a single table. Each subclass is represented by a separate table that contains those fields that are specific to the subclass (not inherited from its superclass), as well as the column(s) that represent its primary key. The primary key column(s) of the subclass table serves as a foreign key to the primary key of the superclass table.
Hope this help,
Giberto
[Updated on: Wed, 02 June 2010 18:24] Report message to a moderator
|
|
|
|
Re: NullPointerException on combining inheritance strategies (table per class + joined) [message #537730 is a reply to message #537517] |
Thu, 03 June 2010 13:38 |
|
JPA does not allow you to have more than one type of inheritance in a hierarchy. You may try instead using a @MappedSuperClass instead of TABLE_PER_CLASS in the root.
EclipseLink should not be throwing a null-pointer though, so please log a bug for that. Also being able to change the inheritance type is a subclass would be desirable, so please log an enhancement for that.
EclipseLink's native API gives you much more freedom in inheritance than JPA, so you may try defining or customizing your descriptors through the ClassDescriptor API.
James : Wiki : Book : Blog : Twitter
|
|
|
Powered by
FUDForum. Page generated in 0.04370 seconds