-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate 3.0 mapping question
PostPosted: Thu Sep 09, 2004 4:09 pm 
Newbie

Joined: Fri Aug 20, 2004 9:25 am
Posts: 9
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.