-->
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.  [ 1 post ] 
Author Message
 Post subject: First child object in the list is null
PostPosted: Tue Sep 01, 2009 10:32 am 
Newbie

Joined: Tue Sep 27, 2005 5:48 am
Posts: 5
Hi,

Hibernate version: 3.2.3

I have a strange problem. I have a parent child table with one to many relationship. I'm using the following code to eagerly fetch the child records when a parent object is loaded.

Code:
<list name="childList" inverse="true" cascade="all" lazy="false" >


But when I'm using "hibernateTemplate.read(id)", it is fetching adding a null object at index 0 apart from the rest of the child objects. Example, say I have 3 child records associated with a parent record, when I read, it gives me a list of size 4 with null in the index 0.

Any help on this is greatly appreciated.

Thanks in Advance.

_________________
Catch me if you Can


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.