openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From devu213 <>
Subject Re: problem when persist object using JOINED inhertitance under 1.1.0
Date Mon, 25 Aug 2008 14:46:24 GMT

Subsequent to my last post, I have tried the code on versions 1.0.2 and
1.2.0. It fails on both ( in addition to 1.1.0 on which I originally tried

Another observation is that if I'm persisting a base class subclass
hierarchy twice in two methods, like I'm doing, the first invocation fails.
However openJPA now understands the inheritance hierarchy properly and the
subsequent call succeeds with openJPA firing the inserts in the proper

This seemingly trivial piece of code is giving me a lot of strife not to
mention the fact that I went on a wild goose chase thinking the problem lay
somewhere else.

Can someone please help me out here ?? I have attached my SQL trace log
which should give some pointers.

Is Inheritancetype.JOINED working for anyone with any version. Can someone
please verify and tell me what I'm doing wrong ? openjpa.log 

Acton Wang wrote:
> hi, 
>       I used 1.1.0 to try to implement a simple JOINED inhertance  using
> orm.xml:
>  <entity class="Parent">  <table name="Parent"/>  <inheritance
> strategy="JOINED"/>  <attributes>   <id name="partyID">    <column
> name="PARTYID" column-definition="VARCHAR(200)" nullable="false"/>   </id>
>     ...  </attributes> </entity> <entity class="Child">  <table
> name="Child"/>  <primary-key-join-column name="PARTYID"
> referenced-column-name="PARTYID"/>  <attributes>   <basic
> name="fullRegisteredName">    <column name="FULLREGISTEREDNAME"
> column-definition="VARCHAR(200)" updatable="true" insertable="true"/>  
> </basic>    .....
>     when I try to persist multiple Child objects, the first one would be
> ok but the following ones will fail and from trace, it seems that it keeps
> inserting into the "Child" table 2 times instead of being inserting Parent
> table first then Child table.
>     It looks no problem if I run it under 1.0.2 version. Is it a bug?
> Thx
> Acton

View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message