Hi Serge, Could you please open a JIRA so we can track this issue?
Thanks, Craig On May 11, 2009, at 11:03 AM, Serge Bogatyrev wrote:
This mixed strategy can be very usefull. But obviously there is uncompatibility with standards. I think that additional annotation can be used to change standard behaviour. So, at this example strict TABLE_PER_CLASS strategy should work without any additional annotations. And to get the mixed strategy we shoud add @Inheritance annotation to some class in hierarchy (e.g. AbsractFoo).Pinaki Poddar:You are right. OpenJPA should use the inheritance strategy used at the rootof the hierarchy throughout the derived tree. The extra strategy specification perhaps is resulting from the facility to support mixed strategy. Needs further investigation... hallmit wrote:Thanks guys, I put @Inheritance(strategy=InheritanceType.TABLE_PER_CLASS)to AbstractFoo and now it works fine...I have also put @Inheritance(strategy=InheritanceType.TABLE_PER_CLASS) to the firstconcrete class of my class hierarchy otherwise the SINGLE_TABLE strategyis used for the branch. I thought it was sufficient to annotate the root class withTABLE_PER_CLASS and so all classes in the hierarchy would have the samestrategy...apparently not for OpenJPA... JSR 220 (JPA-1.0) spec talk :"The Inheritance annotation defines the inheritance strategy to be usedfor an entity class hierarchy.It is specified on the entity class that is the root of the entity classhierarchy." ... In any case thank you very much for your help!----- Pinaki Poddar http://ppoddar.blogspot.com/ http://www.linkedin.com/in/pinakipoddar OpenJPA PMC Member/Committer JPA Expert Group Member
Craig L Russell Architect, Sun Java Enterprise System http://db.apache.org/jdo 408 276-5638 mailto:[email protected] P.S. A good JDO? O, Gasp!
smime.p7s
Description: S/MIME cryptographic signature
