Community
Participate
Working Groups
Build ID: WTP 3.0.1 Steps To Reproduce: If you use the JPA entity wizard to create a new entity and specify a superclass of an existing entity, and check the "Inheritance" checkbox, the child entity is created with an @Inheritance annotation. The spec says that @Inheritance must be on the root of the entity hierarchy, so this seems wrong. [01171671] More information:
I disagree that this is a bug. The spec supports changing inheritance strategies in a class hierarchy. JPA spec section 9.1.29 : The Inheritance annotation defines the inheritance strategy to be used for an entity class hierarchy. It is specified on the entity class that is the root of the entity class hierarchy. Support for the combination of inheritance strategies is not required by this specification. Portable applications should only use a single inheritance strategy within an entity hierarchy. I think the key here is *entity* class hierarchy. This doesn't mean the top of the class hierarchy. I think the wording is slightly confusing, since really if you put an @Inheritance you are defining that to be the root of this entity hierarchy. As soon as you put another @Inheritance in the class hierarchy, then you've defined a new root and the strategy changes. As the spec says, this is not portable, but I see no reason for us to disallow it in the entity wizard.
Moving JPA specific bugs to new JPA component in bugzilla.