[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| 
Re: AW: [eclipselink-users] inheritance with TABLE_PER_CLASS
 | 
Hi Markus,
  In principal, I believe this should work.  Are you having issues?
-Tom
Hahn, Markus wrote:
Hi Tom,
thanks, i read the wiki but could not extract an answer to my question.
My specific issue was that I wanted to know if the following scenario is
supported:
- a base class containing some attributes
- 2 subclasses containing NO attributes, but map on different db tables
- the orm.xml for this scenario
   <orm:entity class="ChangeTrackingExportEntryBase">
       <orm:inheritance strategy="TABLE_PER_CLASS"/>
       <orm:attributes>
       <orm:id name="id">
         <orm:column column-definition="decimal" length="18" name="ID"/>
         <orm:generated-value generator="SeqChangeTrackingExportEntry"/>
       </orm:id>
       <orm:basic name="attributeName">
         <orm:column length="128" name="ATTRIBUTENAME" nullable="true"/>
       </orm:basic>
... some more attributes 
 
 The subclasses:
   <orm:entity class="ChangeTrackingExportEntry">
     <orm:table name="BUYING.CHANGETRACKINGEXPORTENTRY"/>
   </orm:entity>
   <orm:entity class="ChangeTrackingExportEntryHistory">
     <orm:table name="BUYING.CHANGETRACKINGEEHIST"/>
   </orm:entity>
Regards Markus
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users