Apache JDO Project - ORM metadata questioin

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > July 2005 > ORM metadata questioin





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author ORM metadata questioin
Michael Watzek

2005-07-28, 5:45 pm

Hi Craig,

I have an orm metadata question. Consider the following inheritance mapping:

Classes "Person" and "Employee" have inheritance strategy "new-table".
Classes "PartTimeEmployee" and "FullTimeEmployee" have inheritance
strategy "superclass-table".

Is is valid to place the dicriminator column in table "employees"? The
spec seems to forbid that in chapter 18.10:

"...
In the least-derived class in the hierarchy that is mapped to a table,
declare the discriminator element with a strategy and column.
...."

If it is valid, can you have a nested <join> element and a nested
<discriminator> element in the same <inheritance> element? E.g.

<class name="Employee" table="employees">
<inheritance strategy="new-table">
<join column="PERSONID"/>
<discriminator strategy="class-name" column="DISCRIMINATOR"
indexed="true"/>
</inheritance>
...
</class>

Regards,
Michael
--
-------------------------------------------------------------------
Michael Watzek Tech@Spree Engineering GmbH
mailto:mwa.tech@spree.de Buelowstr. 66
Tel.: ++49/30/235 520 36 10783 Berlin - Germany
Fax.: ++49/30/217 520 12 http://www.spree.de/
-------------------------------------------------------------------

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com