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                  [EMAIL PROTECTED] Engineering GmbH
mailto:[EMAIL PROTECTED]        Buelowstr. 66
Tel.:  ++49/30/235 520 36       10783 Berlin - Germany
Fax.:  ++49/30/217 520 12       http://www.spree.de/
-------------------------------------------------------------------

Reply via email to