Hibernate version:3.0 alpha
I'm trying to do the following mapping, but I don't ever get a ClientContract. In the database I have tables for Asset, Contract, ClientContract and PhysicalAsset. There are no database tables for Parcel and Package. Both Contract and ClientContract have the same assetType 3.
Mapping documents:
Mapping containing only relevant info. I've removed id's, properties etc.
<class name="Asset" table="asset">
<discriminator type="string" column="case_of_asset_type_id"/>
<subclass name="Contract" discriminator-value="3">
<join table="contract">
<key column="is_asset_id"></key>
</join>
<subclass name="ClientContract">
<join table="client_contract">
<key column="is_contract_id"></key>
</join>
</subclass>
</subclass>
<subclass name="PhysicalAsset">
<join table="physical_asset">
<key column="is_asset_id"></key>
</join>
<subclass name="Parcel" discriminator-value="1">
</subclass>
<subclass name="Package" discriminator-value="2">
</subclass>
</subclass>
</class>
Thanks for any help,
John
|