Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JPA mixed inheritance strategy issue

754114Feb 16 2010 — edited Mar 3 2010
Table : A, b

Class : A, B, C

@Entity
@Table(name="A")
@Inheritance(strategy=InheritanceType.JOINED)
@DiscriminatorColumn(name="type")
abstract Class A

@Entity
@Table(name="B")
@DiscriminatorValue("B")
@PrimaryKeyJoinColumn()
Class B extends A


@Entity
@DiscriminatorValue("C")
Class C extends A


From A - B its *@Inheritance(strategy=InheritanceType.JOINED)* and from A - C its *@Inheritance(strategy=InheritanceType.SINGLE_TABLE)* by default. When I try to run some test Toplink doesn't identifies class C as mixed strategy but expects C to have its own table as the super class A is specified with Joined strategy. Not sure how else would mixed strategy work !

Any help would be greatly appreciated.

Tx
K
This post has been answered by Cdelahun-Oracle on Feb 17 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 31 2010
Added on Feb 16 2010
3 comments
3,333 views