Joined: Fri May 26, 2006 6:22 am Posts: 3
|
I have a mapping file containing different subclasses based on a discriminator value.
<class name="Kode" table="KODE">
<id name="Id" type="Int32">
<generator class="assigned" />
</id>
<discriminator column ="NAME" type="String"/>
<property name="Code" column="KODE" type="String" unique="true"/>
<subclass name ="TypeAccount" discriminator-value="ACCOUNT"/>
</class>
I want to use a property-ref to link the Accounttype to the Kode using the Code property, like this:
<many-to-one name="Type" column="ACCOUNTTYPE" class="TypeAccount" property-ref="Code"/>
But I always get the error that the Code property cannot be found in the TypeAccount class.
Isn't it possible to combine the property-ref attribute with a subclass based on a discriminator value?
|
|