-->
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: use of property-ref not working
PostPosted: Mon Jul 19, 2004 8:16 pm 
Beginner
Beginner

Joined: Fri Feb 27, 2004 11:47 am
Posts: 24
Is this association right


<hibernate-mapping>
<class table="TEST_ASSOCIATION" name="abcl.TEST_ASSOCIATION">
<id unsaved-value="0" name="ID">
<generator class="native"/>
</id>


<bag name="D_FACILITY" cascade="none" inverse="true" outer-join="false" batch-size="1">
<key column="TEST_ID"/>
<many-to-many class="abc.D_FACILITY" />
</bag>


</class>
</hibernate-mapping>


with

<hibernate-mapping>
<class table="D_FACILITY" name="model.D_FACILITY">
<id unsaved-value="0" name="ID">
<generator class="native"/>
</id>

<many-to-one name="TEST_ASSOCIATION" property-ref="PARENT_FACILITY_ID" column="FACILITY_ID"/>
</class>
</hibernate-mapping>


PARENT_FACILITY_ID is not the primary key in TEST_ASSOCIATION
and FACILITY_ID is same as PARENT_FACILITY_ID in D_FACILITY table

I have tried everything associated with Many - to - One it's not working,

Is there any problem in association

_________________
Web Developer


Top
 Profile  
 
 Post subject: change to question
PostPosted: Mon Jul 19, 2004 8:22 pm 
Beginner
Beginner

Joined: Fri Feb 27, 2004 11:47 am
Posts: 24
<hibernate-mapping>
<class table="TEST_ASSOCIATION" name="abcl.TEST_ASSOCIATION">
<id unsaved-value="0" name="ID">
<generator class="native"/>
</id>


<bag name="D_FACILITY" cascade="none" inverse="true" outer-join="false" batch-size="1">
<key column="TEST_ID"/>
<one-to-many class="abc.D_FACILITY" />
</bag>


</class>
</hibernate-mapping>

_________________
Web Developer


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.