-->
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: reference to two tables for id
PostPosted: Mon Dec 07, 2009 9:55 pm 
Newbie

Joined: Sun Dec 06, 2009 3:49 pm
Posts: 3
Hey guys,
I've the following problem. I've got one Java-Class name Ausleihe with three primary keys from three different tables.
Now I dont't know how I can get the reference in the xml file for id. in the moment i have this code. And I need the two references between the id tags. Does anyone know how to resolve my problem.

<hibernate-mapping package="de.htwberlin.bv.domain">
<class name="Ausleihe" table="Ausleihe" lazy="false">
<id>
<many-to-one name="nutzer" column="AUSWEISNR" insert="false" update="false" class="de.htwberlin.bv.domain.Nutzer"/>
<many-to-one name="exemplar" column="EXEMPLARID" insert="false" update="false" class="de.htwberlin.bv.domain.Exemplar"/>
</id>
<property name="anzahlVerlaengerungen" column="ANZAHL_VERLAENGERUNGEN" type="integer"/>
<property name="ausleihdatum" column="AUSLEIHDATUM" type="date"/>
<property name="erwartetesRueckgabedatum" column="ERWRARTETES_RUECKGABEDATUM" type="date"/>
<property name="gebuehr" column="GEBUEHR" type="big_decimal"/>
<property name="tatsaechlichesRueckgabedatum" column="TATSAECHLICHES_RUECKGABEDATUM" type="date"/>
</class>
</hibernate-mapping>

thanks for your help
kind regards


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.