-->
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: Collection initialized with extra null entry at beginning
PostPosted: Mon Mar 14, 2005 1:30 am 
Beginner
Beginner

Joined: Tue Sep 09, 2003 5:20 pm
Posts: 43
For some reason I'm getting an extra entry in a collection when it is initialized (hydrated) from the database.

In the same transaction I add all of the collection members. then issue a flush, then call a common method that retrieves the updated object and a graph of related objects.

For some reason, after the flush the collection now shows an new null entry at the beginning of the collection. This is a simple parent-child relationship between my PoAssessment class (the parent) and PoAssessmentItem class (the child).

What is going one? I did search the forum, but I was not sure how to even search for this problem.

Thank you for any advice at all - Richard

Hibernate version:
2.1.8

Mapping documents:
<hibernate-mapping>
<class
name="com.acme.model.PoAssessment"
table="PoAssessment"
proxy="com.acme.model.PoAssessment"
dynamic-update="false"
dynamic-insert="false"
select-before-update="false"
optimistic-lock="version" >
<id name="id" type="long" unsaved-value="null" >
<column name="id" unique-key="id"/>
<generator class="native"></generator>
</id>

<version name="version" type="int" column="version" access="property" unsaved-value="undefined" />

<list name="assessmentItems" table="PoAssessmentItems" lazy="true" inverse="true" cascade="all-delete-orphan" >
<key column="assessment" ></key>
<index column="aiNum"/>
<one-to-many class="com.acme.model.PoAssessmentItem" />
</list>
....<SNIP>
</class>
</hibernate-mapping>

<hibernate-mapping>
<class name="com.acme.model.PoAssessmentItem" table="PoAssessmentItem" proxy="com.acme.model.PoAssessmentItem" dynamic-update="false" dynamic-insert="false" select-before-update="false" optimistic-lock="version" >
<id name="id" type="long" unsaved-value="null" >
<column name="id" unique-key="id" />
<generator class="native"></generator>
</id>
<version name="version" type="int" column="version" access="property" unsaved-value="undefined" />
<many-to-one
name="assessment"
class="com.acme.model.PoAssessment"
cascade="none"
outer-join="true"
update="true"
insert="true"
access="property"
>
<column name="assessment" unique-key="userkey" />
</many-to-one>

<property
name="aiNum"
type="int"
update="true"
insert="true"
access="property"
column="aiNum"
/>

<many-to-one
name="measurementItem"
class="com.acme.model.PoMeasurementItem"
cascade="none"
outer-join="true"
update="true"
insert="true"
access="property">
<column
name="measurementItem"
unique-key="userkey"/>
</many-to-one>
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:
MySQL 4.1.7

The generated SQL (show_sql=true):
See Hibernate log below.

Debug level Hibernate log excerpt:
Log output showing collection just before flush:
Code:
21:38:11,578 DEBUG [TP-Processor3] AssessmentDetailGridAction:645 - add - After aMgr.add na.getAssessmentItems=[null/assessment(36788)/aiNum(1)/measurementItem(8331), null/assessment(36788)/aiNum(2)/measurementItem(8464), null/assessment(36788)/aiNum(3)/measurementItem(8182), null/assessment(36788)/aiNum(4)/measurementItem(8155), null/assessment(36788)/aiNum(5)/measurementItem(8496), null/assessment(36788)/aiNum(6)/measurementItem(8272), null/assessment(36788)/aiNum(7)/measurementItem(8363), null/assessment(36788)/aiNum(8)/measurementItem(8156), null/assessment(36788)/aiNum(9)/measurementItem(8222), null/assessment(36788)/aiNum(10)/measurementItem(8122), null/assessment(36788)/aiNum(11)/measurementItem(8122), null/assessment(36788)/aiNum(12)/measurementItem(8083), null/assessment(36788)/aiNum(13)/measurementItem(8028), null/assessment(36788)/aiNum(14)/measurementItem(8142), null/assessment(36788)/aiNum(15)/measurementItem(8188), null/assessment(36788)/aiNum(16)/measurementItem(8483), null/assessment(36788)/aiNum(17)/measurementItem(8377), null/assessment(36788)/aiNum(18)/measurementItem(8357), null/assessment(36788)/aiNum(19)/measurementItem(8375), null/assessment(36788)/aiNum(20)/measurementItem(8427)]'
21:38:11,578 DEBUG [TP-Processor3] SessionImpl:2267 - flushing session


Collection initialization:
Code:
21:38:14,187 DEBUG [TP-Processor3] SessionImpl:3307 - initializing collection [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,187 DEBUG [TP-Processor3] SessionImpl:3308 - checking second-level cache
21:38:14,187 DEBUG [TP-Processor3] SessionImpl:3314 - collection not cached
21:38:14,187 DEBUG [TP-Processor3] BatcherImpl:204 - about to open: 0 open PreparedStatements, 0 open ResultSets
21:38:14,187 DEBUG [TP-Processor3] SQL:230 - select assessment0_.assessment as assessment__, assessment0_.id as id__, assessment0_.aiNum as aiNum__, assessment0_.id as id2_, assessment0_.version as version2_, assessment0_.assessment as assessment2_, assessment0_.aiNum as aiNum2_, assessment0_.measurementItem as measurem5_2_, pomeasurem1_.id as id0_, pomeasurem1_.version as version0_, pomeasurem1_.measurementItemSet as measurem3_0_, pomeasurem1_.liNum as liNum0_, pomeasurem1_.reviewDate as reviewDate0_, pomeasurem2_.id as id1_, pomeasurem2_.version as version1_, pomeasurem2_.classMeasurement as classMea3_1_, pomeasurem2_.problemSet as problemSet1_, pomeasurem2_.lisNum as lisNum1_ from PoAssessmentItem assessment0_ left outer join PoMeasurementItem pomeasurem1_ on assessment0_.measurementItem=pomeasurem1_.id left outer join PoMeasurementItemSet pomeasurem2_ on pomeasurem1_.measurementItemSet=pomeasurem2_.id where assessment0_.assessment=?
21:38:14,187 DEBUG [TP-Processor3] BatcherImpl:253 - preparing statement
21:38:14,203 DEBUG [TP-Processor3] LongType:46 - binding '36788' to parameter: 1
21:38:14,203 DEBUG [TP-Processor3] Loader:406 - result set contains (possibly empty) collection: [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,203 DEBUG [TP-Processor3] SessionImpl:3050 - uninitialized collection: initializing
21:38:14,203 DEBUG [TP-Processor3] Loader:281 - processing result set
21:38:14,203 DEBUG [TP-Processor3] LongType:68 - returning '8331' as column: id0_
21:38:14,203 DEBUG [TP-Processor3] LongType:68 - returning '17' as column: id1_
21:38:14,203 DEBUG [TP-Processor3] LongType:68 - returning '241' as column: id2_
21:38:14,203 DEBUG [TP-Processor3] Loader:484 - result row: 8331, 17, 241
21:38:14,203 DEBUG [TP-Processor3] LongType:68 - returning '36788' as column: assessment__
21:38:14,203 DEBUG [TP-Processor3] Loader:371 - found row of collection: [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,203 DEBUG [TP-Processor3] SessionImpl:3073 - reading row
21:38:14,203 DEBUG [TP-Processor3] LongType:68 - returning '241' as column: id__
21:38:14,203 DEBUG [TP-Processor3] SessionImpl:1996 - loading [com.ltoj.persistence.base.PoAssessmentItem#241]
21:38:14,203 DEBUG [TP-Processor3] SessionImpl:2094 - attempting to resolve [com.ltoj.persistence.base.PoAssessmentItem#241]
21:38:14,203 DEBUG [TP-Processor3] SessionImpl:2110 - resolved object in session cache [com.ltoj.persistence.base.PoAssessmentItem#241]
21:38:14,203 DEBUG [TP-Processor3] IntegerType:68 - returning '1' as column: aiNum__
21:38:14,203 DEBUG [TP-Processor3] LongType:68 - returning '8464' as column: id0_
21:38:14,203 DEBUG [TP-Processor3] LongType:68 - returning '17' as column: id1_
21:38:14,203 DEBUG [TP-Processor3] LongType:68 - returning '242' as column: id2_
21:38:14,203 DEBUG [TP-Processor3] Loader:484 - result row: 8464, 17, 242
21:38:14,218 DEBUG [TP-Processor3] LongType:68 - returning '36788' as column: assessment__
21:38:14,218 DEBUG [TP-Processor3] Loader:371 - found row of collection: [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,218 DEBUG [TP-Processor3] SessionImpl:3073 - reading row
21:38:14,218 DEBUG [TP-Processor3] LongType:68 - returning '242' as column: id__
21:38:14,218 DEBUG [TP-Processor3] SessionImpl:1996 - loading [com.ltoj.persistence.base.PoAssessmentItem#242]
21:38:14,218 DEBUG [TP-Processor3] SessionImpl:2094 - attempting to resolve [com.ltoj.persistence.base.PoAssessmentItem#242]
21:38:14,218 DEBUG [TP-Processor3] SessionImpl:2110 - resolved object in session cache [com.ltoj.persistence.base.PoAssessmentItem#242]
21:38:14,218 DEBUG [TP-Processor3] IntegerType:68 - returning '2' as column: aiNum__
21:38:14,218 DEBUG [TP-Processor3] LongType:68 - returning '8182' as column: id0_
21:38:14,218 DEBUG [TP-Processor3] LongType:68 - returning '17' as column: id1_
21:38:14,218 DEBUG [TP-Processor3] LongType:68 - returning '243' as column: id2_
21:38:14,218 DEBUG [TP-Processor3] Loader:484 - result row: 8182, 17, 243
21:38:14,218 DEBUG [TP-Processor3] LongType:68 - returning '36788' as column: assessment__
21:38:14,218 DEBUG [TP-Processor3] Loader:371 - found row of collection: [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,218 DEBUG [TP-Processor3] SessionImpl:3073 - reading row
21:38:14,218 DEBUG [TP-Processor3] LongType:68 - returning '243' as column: id__
21:38:14,218 DEBUG [TP-Processor3] SessionImpl:1996 - loading [com.ltoj.persistence.base.PoAssessmentItem#243]
21:38:14,218 DEBUG [TP-Processor3] SessionImpl:2094 - attempting to resolve [com.ltoj.persistence.base.PoAssessmentItem#243]
21:38:14,218 DEBUG [TP-Processor3] SessionImpl:2110 - resolved object in session cache [com.ltoj.persistence.base.PoAssessmentItem#243]
21:38:14,218 DEBUG [TP-Processor3] IntegerType:68 - returning '3' as column: aiNum__
21:38:14,218 DEBUG [TP-Processor3] LongType:68 - returning '8155' as column: id0_
21:38:14,234 DEBUG [TP-Processor3] LongType:68 - returning '17' as column: id1_
21:38:14,234 DEBUG [TP-Processor3] LongType:68 - returning '244' as column: id2_
21:38:14,234 DEBUG [TP-Processor3] Loader:484 - result row: 8155, 17, 244
21:38:14,234 DEBUG [TP-Processor3] LongType:68 - returning '36788' as column: assessment__
21:38:14,234 DEBUG [TP-Processor3] Loader:371 - found row of collection: [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,234 DEBUG [TP-Processor3] SessionImpl:3073 - reading row
21:38:14,234 DEBUG [TP-Processor3] LongType:68 - returning '244' as column: id__
21:38:14,234 DEBUG [TP-Processor3] SessionImpl:1996 - loading [com.ltoj.persistence.base.PoAssessmentItem#244]
21:38:14,234 DEBUG [TP-Processor3] SessionImpl:2094 - attempting to resolve [com.ltoj.persistence.base.PoAssessmentItem#244]
21:38:14,234 DEBUG [TP-Processor3] SessionImpl:2110 - resolved object in session cache [com.ltoj.persistence.base.PoAssessmentItem#244]
21:38:14,234 DEBUG [TP-Processor3] IntegerType:68 - returning '4' as column: aiNum__
21:38:14,234 DEBUG [TP-Processor3] LongType:68 - returning '8496' as column: id0_
21:38:14,234 DEBUG [TP-Processor3] LongType:68 - returning '17' as column: id1_
21:38:14,234 DEBUG [TP-Processor3] LongType:68 - returning '245' as column: id2_
21:38:14,234 DEBUG [TP-Processor3] Loader:484 - result row: 8496, 17, 245
21:38:14,234 DEBUG [TP-Processor3] LongType:68 - returning '36788' as column: assessment__
21:38:14,234 DEBUG [TP-Processor3] Loader:371 - found row of collection: [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,234 DEBUG [TP-Processor3] SessionImpl:3073 - reading row
21:38:14,234 DEBUG [TP-Processor3] LongType:68 - returning '245' as column: id__
21:38:14,234 DEBUG [TP-Processor3] SessionImpl:1996 - loading [com.ltoj.persistence.base.PoAssessmentItem#245]
21:38:14,234 DEBUG [TP-Processor3] SessionImpl:2094 - attempting to resolve [com.ltoj.persistence.base.PoAssessmentItem#245]
21:38:14,250 DEBUG [TP-Processor3] SessionImpl:2110 - resolved object in session cache [com.ltoj.persistence.base.PoAssessmentItem#245]
21:38:14,250 DEBUG [TP-Processor3] IntegerType:68 - returning '5' as column: aiNum__
21:38:14,250 DEBUG [TP-Processor3] LongType:68 - returning '8272' as column: id0_
21:38:14,250 DEBUG [TP-Processor3] LongType:68 - returning '17' as column: id1_
21:38:14,250 DEBUG [TP-Processor3] LongType:68 - returning '246' as column: id2_
21:38:14,250 DEBUG [TP-Processor3] Loader:484 - result row: 8272, 17, 246
21:38:14,250 DEBUG [TP-Processor3] LongType:68 - returning '36788' as column: assessment__
21:38:14,250 DEBUG [TP-Processor3] Loader:371 - found row of collection: [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,250 DEBUG [TP-Processor3] SessionImpl:3073 - reading row
21:38:14,250 DEBUG [TP-Processor3] LongType:68 - returning '246' as column: id__
21:38:14,250 DEBUG [TP-Processor3] SessionImpl:1996 - loading [com.ltoj.persistence.base.PoAssessmentItem#246]
21:38:14,250 DEBUG [TP-Processor3] SessionImpl:2094 - attempting to resolve [com.ltoj.persistence.base.PoAssessmentItem#246]
21:38:14,250 DEBUG [TP-Processor3] SessionImpl:2110 - resolved object in session cache [com.ltoj.persistence.base.PoAssessmentItem#246]
21:38:14,250 DEBUG [TP-Processor3] IntegerType:68 - returning '6' as column: aiNum__
21:38:14,250 DEBUG [TP-Processor3] LongType:68 - returning '8363' as column: id0_
21:38:14,250 DEBUG [TP-Processor3] LongType:68 - returning '17' as column: id1_
21:38:14,265 DEBUG [TP-Processor3] LongType:68 - returning '247' as column: id2_
21:38:14,265 DEBUG [TP-Processor3] Loader:484 - result row: 8363, 17, 247
21:38:14,265 DEBUG [TP-Processor3] LongType:68 - returning '36788' as column: assessment__
21:38:14,265 DEBUG [TP-Processor3] Loader:371 - found row of collection: [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,265 DEBUG [TP-Processor3] SessionImpl:3073 - reading row
21:38:14,265 DEBUG [TP-Processor3] LongType:68 - returning '247' as column: id__
21:38:14,265 DEBUG [TP-Processor3] SessionImpl:1996 - loading [com.ltoj.persistence.base.PoAssessmentItem#247]
21:38:14,265 DEBUG [TP-Processor3] SessionImpl:2094 - attempting to resolve [com.ltoj.persistence.base.PoAssessmentItem#247]
21:38:14,265 DEBUG [TP-Processor3] SessionImpl:2110 - resolved object in session cache [com.ltoj.persistence.base.PoAssessmentItem#247]
21:38:14,265 DEBUG [TP-Processor3] IntegerType:68 - returning '7' as column: aiNum__
21:38:14,265 DEBUG [TP-Processor3] LongType:68 - returning '8156' as column: id0_
21:38:14,265 DEBUG [TP-Processor3] LongType:68 - returning '17' as column: id1_
21:38:14,265 DEBUG [TP-Processor3] LongType:68 - returning '248' as column: id2_
21:38:14,265 DEBUG [TP-Processor3] Loader:484 - result row: 8156, 17, 248
21:38:14,265 DEBUG [TP-Processor3] LongType:68 - returning '36788' as column: assessment__
21:38:14,265 DEBUG [TP-Processor3] Loader:371 - found row of collection: [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,265 DEBUG [TP-Processor3] SessionImpl:3073 - reading row
21:38:14,265 DEBUG [TP-Processor3] LongType:68 - returning '248' as column: id__
21:38:14,265 DEBUG [TP-Processor3] SessionImpl:1996 - loading [com.ltoj.persistence.base.PoAssessmentItem#248]
21:38:14,265 DEBUG [TP-Processor3] SessionImpl:2094 - attempting to resolve [com.ltoj.persistence.base.PoAssessmentItem#248]
21:38:14,265 DEBUG [TP-Processor3] SessionImpl:2110 - resolved object in session cache [com.ltoj.persistence.base.PoAssessmentItem#248]
21:38:14,265 DEBUG [TP-Processor3] IntegerType:68 - returning '8' as column: aiNum__
21:38:14,281 DEBUG [TP-Processor3] LongType:68 - returning '8222' as column: id0_
21:38:14,281 DEBUG [TP-Processor3] LongType:68 - returning '17' as column: id1_
21:38:14,281 DEBUG [TP-Processor3] LongType:68 - returning '249' as column: id2_
21:38:14,281 DEBUG [TP-Processor3] Loader:484 - result row: 8222, 17, 249
21:38:14,281 DEBUG [TP-Processor3] LongType:68 - returning '36788' as column: assessment__
21:38:14,281 DEBUG [TP-Processor3] Loader:371 - found row of collection: [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,281 DEBUG [TP-Processor3] SessionImpl:3073 - reading row
21:38:14,281 DEBUG [TP-Processor3] LongType:68 - returning '249' as column: id__
21:38:14,281 DEBUG [TP-Processor3] SessionImpl:1996 - loading [com.ltoj.persistence.base.PoAssessmentItem#249]
21:38:14,281 DEBUG [TP-Processor3] SessionImpl:2094 - attempting to resolve [com.ltoj.persistence.base.PoAssessmentItem#249]
21:38:14,281 DEBUG [TP-Processor3] SessionImpl:2110 - resolved object in session cache [com.ltoj.persistence.base.PoAssessmentItem#249]
21:38:14,281 DEBUG [TP-Processor3] IntegerType:68 - returning '9' as column: aiNum__
21:38:14,281 DEBUG [TP-Processor3] LongType:68 - returning '8122' as column: id0_
21:38:14,281 DEBUG [TP-Processor3] LongType:68 - returning '17' as column: id1_
21:38:14,281 DEBUG [TP-Processor3] LongType:68 - returning '250' as column: id2_
21:38:14,281 DEBUG [TP-Processor3] Loader:484 - result row: 8122, 17, 250
21:38:14,281 DEBUG [TP-Processor3] LongType:68 - returning '36788' as column: assessment__
21:38:14,281 DEBUG [TP-Processor3] Loader:371 - found row of collection: [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,281 DEBUG [TP-Processor3] SessionImpl:3073 - reading row
21:38:14,281 DEBUG [TP-Processor3] LongType:68 - returning '250' as column: id__
21:38:14,281 DEBUG [TP-Processor3] SessionImpl:1996 - loading [com.ltoj.persistence.base.PoAssessmentItem#250]
21:38:14,296 DEBUG [TP-Processor3] SessionImpl:2094 - attempting to resolve [com.ltoj.persistence.base.PoAssessmentItem#250]
21:38:14,296 DEBUG [TP-Processor3] SessionImpl:2110 - resolved object in session cache [com.ltoj.persistence.base.PoAssessmentItem#250]
21:38:14,296 DEBUG [TP-Processor3] IntegerType:68 - returning '10' as column: aiNum__
21:38:14,296 DEBUG [TP-Processor3] LongType:68 - returning '8122' as column: id0_
21:38:14,296 DEBUG [TP-Processor3] LongType:68 - returning '17' as column: id1_
21:38:14,296 DEBUG [TP-Processor3] LongType:68 - returning '251' as column: id2_
21:38:14,296 DEBUG [TP-Processor3] Loader:484 - result row: 8122, 17, 251
21:38:14,296 DEBUG [TP-Processor3] LongType:68 - returning '36788' as column: assessment__
21:38:14,296 DEBUG [TP-Processor3] Loader:371 - found row of collection: [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,296 DEBUG [TP-Processor3] SessionImpl:3073 - reading row
21:38:14,296 DEBUG [TP-Processor3] LongType:68 - returning '251' as column: id__
21:38:14,296 DEBUG [TP-Processor3] SessionImpl:1996 - loading [com.ltoj.persistence.base.PoAssessmentItem#251]
21:38:14,296 DEBUG [TP-Processor3] SessionImpl:2094 - attempting to resolve [com.ltoj.persistence.base.PoAssessmentItem#251]
21:38:14,296 DEBUG [TP-Processor3] SessionImpl:2110 - resolved object in session cache [com.ltoj.persistence.base.PoAssessmentItem#251]
21:38:14,296 DEBUG [TP-Processor3] IntegerType:68 - returning '11' as column: aiNum__
21:38:14,296 DEBUG [TP-Processor3] LongType:68 - returning '8083' as column: id0_
21:38:14,296 DEBUG [TP-Processor3] LongType:68 - returning '17' as column: id1_
21:38:14,296 DEBUG [TP-Processor3] LongType:68 - returning '252' as column: id2_
21:38:14,296 DEBUG [TP-Processor3] Loader:484 - result row: 8083, 17, 252
21:38:14,296 DEBUG [TP-Processor3] LongType:68 - returning '36788' as column: assessment__
21:38:14,296 DEBUG [TP-Processor3] Loader:371 - found row of collection: [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,296 DEBUG [TP-Processor3] SessionImpl:3073 - reading row
21:38:14,312 DEBUG [TP-Processor3] LongType:68 - returning '252' as column: id__
21:38:14,312 DEBUG [TP-Processor3] SessionImpl:1996 - loading [com.ltoj.persistence.base.PoAssessmentItem#252]
21:38:14,312 DEBUG [TP-Processor3] SessionImpl:2094 - attempting to resolve [com.ltoj.persistence.base.PoAssessmentItem#252]
21:38:14,312 DEBUG [TP-Processor3] SessionImpl:2110 - resolved object in session cache [com.ltoj.persistence.base.PoAssessmentItem#252]
21:38:14,312 DEBUG [TP-Processor3] IntegerType:68 - returning '12' as column: aiNum__
21:38:14,312 DEBUG [TP-Processor3] LongType:68 - returning '8028' as column: id0_
21:38:14,312 DEBUG [TP-Processor3] LongType:68 - returning '17' as column: id1_
21:38:14,312 DEBUG [TP-Processor3] LongType:68 - returning '253' as column: id2_
21:38:14,312 DEBUG [TP-Processor3] Loader:484 - result row: 8028, 17, 253
21:38:14,312 DEBUG [TP-Processor3] LongType:68 - returning '36788' as column: assessment__
21:38:14,312 DEBUG [TP-Processor3] Loader:371 - found row of collection: [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,312 DEBUG [TP-Processor3] SessionImpl:3073 - reading row
21:38:14,312 DEBUG [TP-Processor3] LongType:68 - returning '253' as column: id__
21:38:14,312 DEBUG [TP-Processor3] SessionImpl:1996 - loading [com.ltoj.persistence.base.PoAssessmentItem#253]
21:38:14,312 DEBUG [TP-Processor3] SessionImpl:2094 - attempting to resolve [com.ltoj.persistence.base.PoAssessmentItem#253]
21:38:14,312 DEBUG [TP-Processor3] SessionImpl:2110 - resolved object in session cache [com.ltoj.persistence.base.PoAssessmentItem#253]
21:38:14,312 DEBUG [TP-Processor3] IntegerType:68 - returning '13' as column: aiNum__
21:38:14,312 DEBUG [TP-Processor3] LongType:68 - returning '8142' as column: id0_
21:38:14,312 DEBUG [TP-Processor3] LongType:68 - returning '17' as column: id1_
21:38:14,312 DEBUG [TP-Processor3] LongType:68 - returning '254' as column: id2_
21:38:14,328 DEBUG [TP-Processor3] Loader:484 - result row: 8142, 17, 254
21:38:14,328 DEBUG [TP-Processor3] LongType:68 - returning '36788' as column: assessment__
21:38:14,328 DEBUG [TP-Processor3] Loader:371 - found row of collection: [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,328 DEBUG [TP-Processor3] SessionImpl:3073 - reading row
21:38:14,328 DEBUG [TP-Processor3] LongType:68 - returning '254' as column: id__
21:38:14,328 DEBUG [TP-Processor3] SessionImpl:1996 - loading [com.ltoj.persistence.base.PoAssessmentItem#254]
21:38:14,328 DEBUG [TP-Processor3] SessionImpl:2094 - attempting to resolve [com.ltoj.persistence.base.PoAssessmentItem#254]
21:38:14,328 DEBUG [TP-Processor3] SessionImpl:2110 - resolved object in session cache [com.ltoj.persistence.base.PoAssessmentItem#254]
21:38:14,328 DEBUG [TP-Processor3] IntegerType:68 - returning '14' as column: aiNum__
21:38:14,328 DEBUG [TP-Processor3] LongType:68 - returning '8188' as column: id0_
21:38:14,328 DEBUG [TP-Processor3] LongType:68 - returning '17' as column: id1_
21:38:14,328 DEBUG [TP-Processor3] LongType:68 - returning '255' as column: id2_
21:38:14,328 DEBUG [TP-Processor3] Loader:484 - result row: 8188, 17, 255
21:38:14,328 DEBUG [TP-Processor3] LongType:68 - returning '36788' as column: assessment__
21:38:14,328 DEBUG [TP-Processor3] Loader:371 - found row of collection: [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,328 DEBUG [TP-Processor3] SessionImpl:3073 - reading row
21:38:14,328 DEBUG [TP-Processor3] LongType:68 - returning '255' as column: id__
21:38:14,328 DEBUG [TP-Processor3] SessionImpl:1996 - loading [com.ltoj.persistence.base.PoAssessmentItem#255]
21:38:14,328 DEBUG [TP-Processor3] SessionImpl:2094 - attempting to resolve [com.ltoj.persistence.base.PoAssessmentItem#255]
21:38:14,328 DEBUG [TP-Processor3] SessionImpl:2110 - resolved object in session cache [com.ltoj.persistence.base.PoAssessmentItem#255]
21:38:14,328 DEBUG [TP-Processor3] IntegerType:68 - returning '15' as column: aiNum__
21:38:14,328 DEBUG [TP-Processor3] LongType:68 - returning '8483' as column: id0_
21:38:14,343 DEBUG [TP-Processor3] LongType:68 - returning '17' as column: id1_
21:38:14,343 DEBUG [TP-Processor3] LongType:68 - returning '256' as column: id2_
21:38:14,343 DEBUG [TP-Processor3] Loader:484 - result row: 8483, 17, 256
21:38:14,343 DEBUG [TP-Processor3] LongType:68 - returning '36788' as column: assessment__
21:38:14,343 DEBUG [TP-Processor3] Loader:371 - found row of collection: [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,343 DEBUG [TP-Processor3] SessionImpl:3073 - reading row
21:38:14,343 DEBUG [TP-Processor3] LongType:68 - returning '256' as column: id__
21:38:14,343 DEBUG [TP-Processor3] SessionImpl:1996 - loading [com.ltoj.persistence.base.PoAssessmentItem#256]
21:38:14,343 DEBUG [TP-Processor3] SessionImpl:2094 - attempting to resolve [com.ltoj.persistence.base.PoAssessmentItem#256]
21:38:14,343 DEBUG [TP-Processor3] SessionImpl:2110 - resolved object in session cache [com.ltoj.persistence.base.PoAssessmentItem#256]
21:38:14,343 DEBUG [TP-Processor3] IntegerType:68 - returning '16' as column: aiNum__
21:38:14,343 DEBUG [TP-Processor3] LongType:68 - returning '8377' as column: id0_
21:38:14,343 DEBUG [TP-Processor3] LongType:68 - returning '17' as column: id1_
21:38:14,343 DEBUG [TP-Processor3] LongType:68 - returning '257' as column: id2_
21:38:14,343 DEBUG [TP-Processor3] Loader:484 - result row: 8377, 17, 257
21:38:14,343 DEBUG [TP-Processor3] LongType:68 - returning '36788' as column: assessment__
21:38:14,343 DEBUG [TP-Processor3] Loader:371 - found row of collection: [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,343 DEBUG [TP-Processor3] SessionImpl:3073 - reading row
21:38:14,343 DEBUG [TP-Processor3] LongType:68 - returning '257' as column: id__
21:38:14,343 DEBUG [TP-Processor3] SessionImpl:1996 - loading [com.ltoj.persistence.base.PoAssessmentItem#257]
21:38:14,343 DEBUG [TP-Processor3] SessionImpl:2094 - attempting to resolve [com.ltoj.persistence.base.PoAssessmentItem#257]
21:38:14,343 DEBUG [TP-Processor3] SessionImpl:2110 - resolved object in session cache [com.ltoj.persistence.base.PoAssessmentItem#257]
21:38:14,359 DEBUG [TP-Processor3] IntegerType:68 - returning '17' as column: aiNum__
21:38:14,359 DEBUG [TP-Processor3] LongType:68 - returning '8357' as column: id0_
21:38:14,359 DEBUG [TP-Processor3] LongType:68 - returning '17' as column: id1_
21:38:14,359 DEBUG [TP-Processor3] LongType:68 - returning '258' as column: id2_
21:38:14,359 DEBUG [TP-Processor3] Loader:484 - result row: 8357, 17, 258
21:38:14,359 DEBUG [TP-Processor3] LongType:68 - returning '36788' as column: assessment__
21:38:14,359 DEBUG [TP-Processor3] Loader:371 - found row of collection: [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,359 DEBUG [TP-Processor3] SessionImpl:3073 - reading row
21:38:14,359 DEBUG [TP-Processor3] LongType:68 - returning '258' as column: id__
21:38:14,359 DEBUG [TP-Processor3] SessionImpl:1996 - loading [com.ltoj.persistence.base.PoAssessmentItem#258]
21:38:14,359 DEBUG [TP-Processor3] SessionImpl:2094 - attempting to resolve [com.ltoj.persistence.base.PoAssessmentItem#258]
21:38:14,359 DEBUG [TP-Processor3] SessionImpl:2110 - resolved object in session cache [com.ltoj.persistence.base.PoAssessmentItem#258]
21:38:14,359 DEBUG [TP-Processor3] IntegerType:68 - returning '18' as column: aiNum__
21:38:14,359 DEBUG [TP-Processor3] LongType:68 - returning '8375' as column: id0_
21:38:14,359 DEBUG [TP-Processor3] LongType:68 - returning '17' as column: id1_
21:38:14,359 DEBUG [TP-Processor3] LongType:68 - returning '259' as column: id2_
21:38:14,359 DEBUG [TP-Processor3] Loader:484 - result row: 8375, 17, 259
21:38:14,359 DEBUG [TP-Processor3] LongType:68 - returning '36788' as column: assessment__
21:38:14,359 DEBUG [TP-Processor3] Loader:371 - found row of collection: [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,359 DEBUG [TP-Processor3] SessionImpl:3073 - reading row
21:38:14,359 DEBUG [TP-Processor3] LongType:68 - returning '259' as column: id__
21:38:14,359 DEBUG [TP-Processor3] SessionImpl:1996 - loading [com.ltoj.persistence.base.PoAssessmentItem#259]
21:38:14,375 DEBUG [TP-Processor3] SessionImpl:2094 - attempting to resolve [com.ltoj.persistence.base.PoAssessmentItem#259]
21:38:14,375 DEBUG [TP-Processor3] SessionImpl:2110 - resolved object in session cache [com.ltoj.persistence.base.PoAssessmentItem#259]
21:38:14,375 DEBUG [TP-Processor3] IntegerType:68 - returning '19' as column: aiNum__
21:38:14,375 DEBUG [TP-Processor3] LongType:68 - returning '8427' as column: id0_
21:38:14,375 DEBUG [TP-Processor3] LongType:68 - returning '17' as column: id1_
21:38:14,375 DEBUG [TP-Processor3] LongType:68 - returning '260' as column: id2_
21:38:14,375 DEBUG [TP-Processor3] Loader:484 - result row: 8427, 17, 260
21:38:14,375 DEBUG [TP-Processor3] LongType:68 - returning '36788' as column: assessment__
21:38:14,375 DEBUG [TP-Processor3] Loader:371 - found row of collection: [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,375 DEBUG [TP-Processor3] SessionImpl:3073 - reading row
21:38:14,375 DEBUG [TP-Processor3] LongType:68 - returning '260' as column: id__
21:38:14,375 DEBUG [TP-Processor3] SessionImpl:1996 - loading [com.ltoj.persistence.base.PoAssessmentItem#260]
21:38:14,375 DEBUG [TP-Processor3] SessionImpl:2094 - attempting to resolve [com.ltoj.persistence.base.PoAssessmentItem#260]
21:38:14,375 DEBUG [TP-Processor3] SessionImpl:2110 - resolved object in session cache [com.ltoj.persistence.base.PoAssessmentItem#260]
21:38:14,375 DEBUG [TP-Processor3] IntegerType:68 - returning '20' as column: aiNum__
21:38:14,375 DEBUG [TP-Processor3] Loader:298 - done processing result set (20 rows)
21:38:14,375 DEBUG [TP-Processor3] BatcherImpl:211 - done closing: 0 open PreparedStatements, 0 open ResultSets
21:38:14,375 DEBUG [TP-Processor3] BatcherImpl:275 - closing statement
21:38:14,375 DEBUG [TP-Processor3] Loader:318 - total objects hydrated: 0
21:38:14,390 DEBUG [TP-Processor3] SessionImpl:3109 - 1 collections were found in result set
21:38:14,390 DEBUG [TP-Processor3] SessionImpl:3140 - collection fully initialized: [com.ltoj.persistence.base.PoAssessment.assessmentItems#36788]
21:38:14,390 DEBUG [TP-Processor3] SessionImpl:3143 - 1 collections initialized
21:38:14,390 DEBUG [TP-Processor3] SessionImpl:3161 - initializing non-lazy collections
21:38:14,390 DEBUG [TP-Processor3] SessionImpl:3316 - collection initialized

Collection display after initialization with extra "null" entry.:
Code:
21:38:14,390 DEBUG [TP-Processor3] AssessmentDetailGridAction:662 - add - After flush; na.assessmentItems=[null, 241/assessment(36788)/aiNum(1)/measurementItem(8331), 242/assessment(36788)/aiNum(2)/measurementItem(8464), 243/assessment(36788)/aiNum(3)/measurementItem(8182), 244/assessment(36788)/aiNum(4)/measurementItem(8155), 245/assessment(36788)/aiNum(5)/measurementItem(8496), 246/assessment(36788)/aiNum(6)/measurementItem(8272), 247/assessment(36788)/aiNum(7)/measurementItem(8363), 248/assessment(36788)/aiNum(8)/measurementItem(8156), 249/assessment(36788)/aiNum(9)/measurementItem(8222), 250/assessment(36788)/aiNum(10)/measurementItem(8122), 251/assessment(36788)/aiNum(11)/measurementItem(8122), 252/assessment(36788)/aiNum(12)/measurementItem(8083), 253/assessment(36788)/aiNum(13)/measurementItem(8028), 254/assessment(36788)/aiNum(14)/measurementItem(8142), 255/assessment(36788)/aiNum(15)/measurementItem(8188), 256/assessment(36788)/aiNum(16)/measurementItem(8483), 257/assessment(36788)/aiNum(17)/measurementItem(8377), 258/assessment(36788)/aiNum(18)/measurementItem(8357), 259/assessment(36788)/aiNum(19)/measurementItem(8375), 260/assessment(36788)/aiNum(20)/measurementItem(8427)]'
[/code]


Top
 Profile  
 
 Post subject: Collection initialized with extra null at begining SOLVED
PostPosted: Mon Mar 14, 2005 2:11 pm 
Beginner
Beginner

Joined: Tue Sep 09, 2003 5:20 pm
Posts: 43
Nevermind. Sincere apologies.

The index needs to start with 0, I was starting with 1. Hibernate was just putting the null entry (correctly) in position 0.


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.