-->
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: empty Collection by right mapping
PostPosted: Wed Sep 29, 2004 7:33 am 
Newbie

Joined: Mon Sep 13, 2004 3:36 am
Posts: 4
I use hibernate2 (net.sf.hibernate.dialect.DB2390Dialect) with COM.ibm.db2.jdbc.app.DB2Driver
and have very easy case:
one table (parent) have composite-id with 3 columns: 18-langht String, integer and short
second (child) Table have composite-id with 4 columns (tree from parent and addition short )
I define relationship only in parent mapping (child can’t live without parent)

<set name = "children">
<key>
<column name="string"/>
<column name="integer"/>
<column name="short"/>
</key>
<one-to-many class="de.kkh.business.entity_hb.person.child"/>
</set>

I load my parent and see in log, that hibernate find in DB2 my child for this parent, but my result Set "children “ is on the end empty!!!
If I chance definition the tables from long-long 18-langht String to short (for example), I have my Set OK.
The question is: if hibernate has same problem with composite-keys as String?
I can’t chance my model :(.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 12, 2005 4:05 pm 
Senior
Senior

Joined: Tue Jan 11, 2005 5:03 pm
Posts: 137
Location: Montreal, Quebec
Hi,

did you found a way to correct your problem? I have the same problem with the db2 database. I made a copy of 2 tables on a MySql, with identical fields and mapping than the db2, and I didn't have the problem.


Thanks.
Etienne
Montreal


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.