db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Watzek <mwa.t...@spree.de>
Subject ORM metadata questioin
Date Thu, 28 Jul 2005 15:04:34 GMT
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"

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/

View raw message