-->
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.  [ 2 posts ] 
Author Message
 Post subject: natural-id from component column and many-to-one column
PostPosted: Wed Dec 20, 2006 2:34 pm 
Newbie

Joined: Wed Dec 20, 2006 2:26 pm
Posts: 2
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

[b]Hibernate version:3.2.0

[b]Name and version of the database you are using:mysql

Hi,

I am new to hibernate. My natural-id is a combination of a column from a component and a many-to-one field.


<component name="nameValuePair"
class="xxx.sss.NameValuePair">
<property name="name" type="string">
<column name="nvname" not-null="true" length="255"/>
</property>
<property name="value" type="string">
<column name="nvvalue" not-null="false" length="255"/>
</property>
</component>


<many-to-one name="field"
class="xxx.yyy.Field" cascade="none"
fetch="join">
<column name="field_id" />
</many-to-one>

How do i map the natural-id? Following does not work.

<natural-id>
<property name="field"/>
<property name="nvname" not-null="true" length="255"/>
</natural-id>


thank you.


I figured it out. - thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 21, 2006 12:21 pm 
Newbie

Joined: Wed Dec 20, 2006 2:26 pm
Posts: 2
How do i include a column from a component in natural-id.


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

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.