-->
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: null values in collection
PostPosted: Fri Feb 05, 2010 3:40 pm 
Newbie

Joined: Fri Feb 05, 2010 3:28 pm
Posts: 5
Hello

I have a Size Chart object with multiple Size Value associated with it. In case you're wondering, a Size Chart might be "dress sizes" and its associated Size Values might be "small", "medium", and "large". When I retrieve the object from Hibernate, the list of size charts contains a null value.

I turned on debug_sql and executed the SELECT statement. The SELECT statement returned 7 rows, but the collection inside my Java object has 8 entries, one of which is null. Can somebody help me debug this? Thank you!

The HBM looks like this:

<class
name="com.bluefly.apps.manager.domain.VendorSizeChart"
table="VENDOR_SIZE_CHART"
proxy="com.bluefly.apps.manager.domain.VendorSizeChart"
>
<list
name="vendorSizeValues"
inverse="true"
cascade="all"
>
<key column="VENDOR_SIZE_CHART_ID" not-null="true"/>
<list-index column="SORT_ORDER" base="1"/>
<one-to-many class="com.bluefly.apps.manager.domain.VendorSizeValue" />
</list>
</class>


<class
name="com.bluefly.apps.manager.domain.VendorSizeValue"
table="VENDOR_SIZE_VALUE"
proxy="com.bluefly.apps.manager.domain.VendorSizeValue"
>
<many-to-one
name="vendorSizeChart"
class="com.bluefly.apps.manager.domain.VendorSizeChart"
not-null="true"
cascade="all"
>
<meta attribute="use-in-equals">true</meta>
<meta attribute="use-in-tostring">true</meta>
<column name="VENDOR_SIZE_CHART_ID"/>
</many-to-one>

</class>

I am using Hibernate 3.2.2 with Oracle 10.2, JBoss, and Spring


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.