-->
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: List Mapping has null values..
PostPosted: Tue Jun 19, 2007 2:41 pm 
Newbie

Joined: Fri Jan 27, 2006 10:16 am
Posts: 2
I have a List mapping in an object as below -

<class name="test.eventmodel.Alert"
table="Alert" lazy="false">
<cache usage="read-write" />
<id name="alertId" column="alertId">
<generator class="increment"/>
</id>
<property name="type" column="type" />
<list name="alertData" lazy="false" cascade="all,delete-orphan" >
<cache usage="read-write" />
<key column="alertId" />
<list-index column="AlertDataOrder" base="0" />
<one-to-many
class="test.eventmodel.AlertData" />
</list>
</class>

When I retrieve the 'Alert' object, I get the list of 'AlertData' in it with 'null' objects in places where no object was associated at that index.

Is there any way where I can retrieve Alert object with the alertData list NOT containig null values?
If not, what is the best way to compact the list by removing null values?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 19, 2007 2:58 pm 
Senior
Senior

Joined: Tue Jun 12, 2007 4:49 pm
Posts: 127
Location: India
I don't think thats possible. The entry order is maintained by hibernate and it expects to have all entries filled in all index locations.

Regards,
Jitendra


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.