-->
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: Composite-id + mapping issue
PostPosted: Wed Sep 10, 2008 2:48 pm 
Newbie

Joined: Wed Sep 10, 2008 2:31 pm
Posts: 16
So here is an example of my problem (really bad example)

"Person.hbm.xml"
Code:
      <composite-id name="personPK" class="blah.blah.PersonPK">
         <key-property name="fullName" column="FULL_NAME_COLUMN" type="string" />
         <key-property name="address" column="ADDRESS_COLUMN" type="string" />
      </composite-id>

      <property name="family" column="FAMILY" type="string" />   
      <one-to-one name="Address" foreign-key="ADDRESS_COLUMN" class="blah.blah.Address"/>


"Address.hbm.xml"
Code:
      <id  name="id" column="ADDRESS_ID_COLUMN" type="string" />
      <property name="street" column="STREET" type="string"/>



Everything works well, except the <one-to-one> at the end of the Person.hbm.xml. I've done it before with just a regular id, but the composite-id is toying with me... Got any advice?

Note: I wanted to do a join on the table, but I wasn't able to get past that part either, so I figured I would just map the whole table/object in Address.hbm.xml


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 10, 2008 3:51 pm 
Newbie

Joined: Wed Sep 10, 2008 2:31 pm
Posts: 16
nevermind, there was an error with the address mapping file not being found, and they were trying to extract information from two different databases...


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.