-->
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.  [ 3 posts ] 
Author Message
 Post subject: Insert problem when using "property-ref"
PostPosted: Tue Aug 07, 2007 6:35 am 
Newbie

Joined: Tue Jul 24, 2007 9:48 am
Posts: 4
Hi guys, I have some problem when joining 2 tables. In the xml below, I used property-ref to join 2 different tables, however when I save FooObject in hibernate, it insert the id of FooObj instead of referenceId to the column TBL_B_REF_ID of TBL_B. Does anyone know how to fix this problem? Thx.

Code:
<class name="FooObj" table="TBL_A">

    <id name="id" column="TBL_A_ID">
      <generator class="sequence">
        <param name="sequence">SEQ_TBL_A_KEY</param>
      </generator>
    </id>

    <property name="referenceId"  column="TBL_A_REF_ID" />

    <join table="TBL_B">
      <key column="TBL_B_REF_ID" on-delete="cascade" property-ref="referenceId" />
      <property name="foo1"            column="TBL_B_COL_1" />
      <property name="foo2"      column="TBL_B_COL_1" />
    </join>

</class>


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 07, 2007 7:33 am 
Expert
Expert

Joined: Fri Jul 13, 2007 8:18 am
Posts: 370
Location: london
This functionality is missing. There's an open JIRA issue with a patch for 3.2 here:
http://opensource.atlassian.com/project ... e/HHH-1829

I just checked the head revision and the patch _hasn't_ been integrated.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 07, 2007 9:31 pm 
Newbie

Joined: Tue Jul 24, 2007 9:48 am
Posts: 4
Thx for the info. Hope it will get fixed in next release....


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.