Details
Description
I'm mapping each table to a single object. In inheritance, only the ID field is in both tables.
Here is the object definition :
MyDoc extend Doc
Orga extend Party
Party has a collection of Doc
Doc has a reference to Party
In Orga, I ignore the collection inherited
In MyDoc, I ignore the reference to party and partyId
Before this fixe, I've got the error :
<<Cannot ignore field partyId in class MyDoc because it is used in class
Doc as a foreignkey of the collection partyDocs from class Orga>>
Now I have :
<<Cannot ignore field partyId in class MyDoc because it is used in class
Doc as a foreignkey of the collection partyDocs from class Party>>
Desired repository :
---------
<class-descriptor
class="Doc"
table="DCT_DOC"
>
<field-descriptor
name="partyId"
column="PartyId"
jdbc-type="INTEGER"
access="anonymous"
>
</field-descriptor>
<field-descriptor
name="documentId"
column="documentId"
jdbc-type="INTEGER"
primarykey="true"
nullable="false"
autoincrement="true"
access="readonly"
>
</field-descriptor>
<reference-descriptor
name="party"
class-ref="Party"
proxy="true"
>
<foreignkey field-ref="partyId"/>
</reference-descriptor>
</class-descriptor>
<class-descriptor
class="MyDoc"
table="DCT_MYDOC"
>
<field-descriptor
name="documentId"
column="documentId"
jdbc-type="INTEGER"
primarykey="true"
nullable="false"
access="readwrite"
>
</field-descriptor>
<reference-descriptor
name="super"
class-ref="Doc"
auto-retrieve="true"
auto-update="object"
auto-delete="object"
>
<foreignkey field-ref="documentId"/>
</reference-descriptor>
</class-descriptor>
<class-descriptor
class="Party"
table="PTY_PARTY"
>
<field-descriptor
name="partyId"
column="partyId"
jdbc-type="INTEGER"
primarykey="true"
nullable="false"
autoincrement="true"
access="readonly"
>
</field-descriptor>
<collection-descriptor
name="partyDocuments"
element-class-ref="Doc"
proxy="true"
>
<inverse-foreignkey field-ref="partyId"/>
</collection-descriptor>
</class-descriptor>
<class-descriptor
class="Orga"
table="PTY_ORGA"
>
<field-descriptor
name="partyId"
column="partyId"
jdbc-type="INTEGER"
primarykey="true"
nullable="false"
access="readwrite"
>
</field-descriptor>
<reference-descriptor
name="super"
class-ref="Party"
auto-retrieve="true"
auto-update="object"
auto-delete="object"
>
<foreignkey field-ref="partyId"/>
</reference-descriptor>
</class-descriptor>