-->
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.  [ 4 posts ] 
Author Message
 Post subject: usertype and collection.size=0
PostPosted: Mon Mar 13, 2006 5:10 pm 
Newbie

Joined: Thu Feb 23, 2006 1:23 pm
Posts: 8
I am facing the situation as described in :

http://forums.hibernate.org/viewtopic.p ... fcedc553be

a child collection is loaded but is not attached to its parent (size = 0). It works when I use a Long as the parentId but as soon as I use a UserType, it doesn't work.

help !


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 13, 2006 7:12 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
Are you using Types.NUMERIC like tzman was? If you are, try Types.BIGINT instead. Longs map to BIGINTs, NUMERIC is for certain kinds of floating point numbers (though usually DECIMAL is a better choice).


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 14, 2006 10:47 am 
Newbie

Joined: Thu Feb 23, 2006 1:23 pm
Posts: 8
I do use Types.BIGINT

I don't understand. The many-to-one seems perfectly but the one-to-many doesn't work with UserType.

Does anyone know a solution?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 14, 2006 11:13 am 
Newbie

Joined: Thu Feb 23, 2006 1:23 pm
Posts: 8
The problem maybe near Loader.readCollectionElement(). Currently, owner is null. As I understand it, the owner should be set to the parent?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.