-->
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: many-to-one relationship using composite keys
PostPosted: Wed Mar 22, 2006 12:18 am 
Newbie

Joined: Thu Mar 16, 2006 10:07 pm
Posts: 3
Location: New Zealand
Hi, Having a little trouble trying to map a many-to-one relationship where a composite key is required. The error I'm getting says something about using update="false" insert="false" but these attributes are not valid in NHibernate.

The troubled mapping is:

<class name="SITO.Entity.TrainingUnitStandardAssessor, SITO.Entity" table="Training_Unit_Standard_Assessor">
<composite-id>
<key-many-to-one name="ThisTraining" column="Training_ID" class="SITO.Entity.Training, SITO.Entity" />
<key-many-to-one name="ThisTrainingUnitStandard" column="Training_ID" class="SITO.Entity.TrainingUnitStandard, SITO.Entity" >
<column name="Training_ID" />
<column name="Unit_Standard_ID" />
</key-many-to-one>
<key-many-to-one name="ThisAssessor" column="Assessor_ID" class="SITO.Entity.RegisteredAssessor, SITO.Entity" />
</composite-id>
</class>
<!-- End of: Mapping for Training_Unit_Standard_Assessor -->

Any suggestions? (hopefully, just looking at the data model and their are plenty more (3 keys)).


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.