-->
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: list collection
PostPosted: Thu Oct 23, 2003 3:34 pm 
Regular
Regular

Joined: Wed Sep 10, 2003 2:26 pm
Posts: 56
Location: San Diego, CA
Hi,

When Hibernate replaces Java's list object with it's own implementation upon a call to saveOrUpdate(), what may cause the new list be empty?

What is happening to me is this. I have an object containing a List property. This property is mapped to a list collection:

<list name="stages" lazy="false" table="routing_stage" cascade="all">
<key column="routing_tracker_id"/>
<index column="stage_num" type="int" />
<one-to-many class="edu.ucsd.som.tracker.RoutingStage"/>
</list>

right before a call to saveOrUpdate() "stages" contains a reference to an instance of ArrayList with 3 items (verified in debugger). Right after the call to saveOrUpdate(), "stages" points to an empty list.

What could be causing this?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 23, 2003 3:55 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
broken getter?

I can't see how it could be a bug - this is VERY well-tested functionality....


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 23, 2003 4:00 pm 
Regular
Regular

Joined: Wed Sep 10, 2003 2:26 pm
Posts: 56
Location: San Diego, CA
gavin wrote:
broken getter?

I can't see how it could be a bug - this is VERY well-tested functionality....


I know it's not a bug and I'm not saying that :) But I have no idea what to look for in my code and where to start looking.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 23, 2003 4:11 pm 
Regular
Regular

Joined: Wed Sep 10, 2003 2:26 pm
Posts: 56
Location: San Diego, CA
thanks gavin, your broken getter comment put me on the right track.


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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.