-->
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: 'null' object is returned in query result list.
PostPosted: Fri Aug 19, 2005 3:41 pm 
Beginner
Beginner

Joined: Tue May 17, 2005 9:10 am
Posts: 29
Hibernate version: hibernate2
Name and version of the database you are using: Oracle RDB

We've run into three cases which messed up query result with 'null' and without any exceptions/errors dispalyed.
1. If hibernate mapping is unmattched , eg. String vs. Date, see HB-1463
2. If the mapped attributes are never been set.
3. In many-to-one, if the 'one' is nullable and there are more than one records are created in db. The problem is one record is missing in the hibernate query list. However it works fine if only one record with null.

We've already get around case1. & 2. However we can't get around case 3. since the data creation is driven by end users at run time.

//logs can tell everything, the result list should contain '565','566','567', however '566' is missing, see comments in highlight:

QueryTranslator] HQL: select rrm from edu.mnscu.housing.vo.RoomPrefReservation as rrm left outer join fetch rrm.bldg left outer join fetch rrm.roomType left outer join fetch rrm.floorGender left outer join fetch rrm.community where rrm.reservation.id = :rsrvId
2005-08-19 13:24:26,468 DEBUG [net.sf.hibernate.hql.QueryTranslator] SQL: select roomprefre0_.sh_res_rank_pref_id as sh_res_r1_0_, roomprefop2_.rpt_center_val_master_id as rpt_cent1_1_, bldgprefop1_.bldg_code as bldg_code2_, communityp4_.rpt_center_val_master_id as rpt_cent1_3_, genderpref3_.val_master_id as val_mast1_4_, roomprefre0_.sh_res_rsrv_id as sh_res_r2_0_, roomprefre0_.rsrv_rank_nbr as rsrv_ran3_0_, roomprefre0_.bldg_code as bldg_code0_, roomprefre0_.room_type_id as room_typ5_0_, roomprefre0_.gender_option_id as gender_o6_0_, roomprefre0_.floor_option_id as floor_op7_0_, roomprefre0_.rc_id as rc_id0_, roomprefop2_.rc_id as rc_id1_, roomprefop2_.val_code as val_code1_, roomprefop2_.val_long_desc as val_long5_1_, bldgprefop1_.bldg_name as bldg_name2_, bldgprefop1_.rc_id as rc_id2_, communityp4_.rc_id as rc_id3_, communityp4_.val_code as val_code3_, communityp4_.val_long_desc as val_long5_3_, genderpref3_.val_code as val_code4_, genderpref3_.val_long_desc as val_long4_4_ from sh_res_rank_pref roomprefre0_, v_sh_bldg bldgprefop1_, rpt_center_val_master roomprefop2_, val_master genderpref3_, rpt_center_val_master communityp4_ where roomprefre0_.bldg_code=bldgprefop1_.bldg_code(+) and roomprefre0_.room_type_id=roomprefop2_.rpt_center_val_master_id(+) and roomprefre0_.gender_option_id=genderpref3_.val_master_id(+) and roomprefre0_.floor_option_id=communityp4_.rpt_center_val_master_id(+) and ((roomprefre0_.sh_res_rsrv_id=? ))
2005-08-19 13:24:26,468 DEBUG [net.sf.hibernate.impl.BatcherImpl] about to open: 0 open PreparedStatements, 0 open ResultSets
2005-08-19 13:24:26,468 DEBUG [net.sf.hibernate.SQL] select roomprefre0_.sh_res_rank_pref_id as sh_res_r1_0_, roomprefop2_.rpt_center_val_master_id as rpt_cent1_1_, bldgprefop1_.bldg_code as bldg_code2_, communityp4_.rpt_center_val_master_id as rpt_cent1_3_, genderpref3_.val_master_id as val_mast1_4_, roomprefre0_.sh_res_rsrv_id as sh_res_r2_0_, roomprefre0_.rsrv_rank_nbr as rsrv_ran3_0_, roomprefre0_.bldg_code as bldg_code0_, roomprefre0_.room_type_id as room_typ5_0_, roomprefre0_.gender_option_id as gender_o6_0_, roomprefre0_.floor_option_id as floor_op7_0_, roomprefre0_.rc_id as rc_id0_, roomprefop2_.rc_id as rc_id1_, roomprefop2_.val_code as val_code1_, roomprefop2_.val_long_desc as val_long5_1_, bldgprefop1_.bldg_name as bldg_name2_, bldgprefop1_.rc_id as rc_id2_, communityp4_.rc_id as rc_id3_, communityp4_.val_code as val_code3_, communityp4_.val_long_desc as val_long5_3_, genderpref3_.val_code as val_code4_, genderpref3_.val_long_desc as val_long4_4_ from sh_res_rank_pref roomprefre0_, v_sh_bldg bldgprefop1_, rpt_center_val_master roomprefop2_, val_master genderpref3_, rpt_center_val_master communityp4_ where roomprefre0_.bldg_code=bldgprefop1_.bldg_code(+) and roomprefre0_.room_type_id=roomprefop2_.rpt_center_val_master_id(+) and roomprefre0_.gender_option_id=genderpref3_.val_master_id(+) and roomprefre0_.floor_option_id=communityp4_.rpt_center_val_master_id(+) and ((roomprefre0_.sh_res_rsrv_id=? ))
2005-08-19 13:24:26,468 DEBUG [net.sf.hibernate.impl.BatcherImpl] preparing statement
2005-08-19 13:24:26,562 DEBUG [net.sf.hibernate.type.LongType] binding '973' to parameter: 1
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.loader.Loader] processing result set
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.type.LongType] returning '565' as column: sh_res_r1_0_
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.type.LongType] returning '29' as column: rpt_cent1_1_
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.type.StringType] returning 'MAPLE ' as column: bldg_code2_
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.type.LongType] returning '115' as column: rpt_cent1_3_
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.type.LongType] returning '0' as column: val_mast1_4_
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.loader.Loader] result row: 565, 29, MAPLE , 115, 0
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.loader.Loader] Initializing object from ResultSet: 565
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.loader.Loader] Hydrating entity: edu.mnscu.housing.vo.RoomPrefReservation#565
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.type.LongType] returning '973' as column: sh_res_r2_0_
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.type.IntegerType] returning '1' as column: rsrv_ran3_0_
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.type.StringType] returning 'MAPLE ' as column: bldg_code0_
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.type.LongType] returning '29' as column: room_typ5_0_
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.type.LongType] returning '0' as column: gender_o6_0_
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.type.LongType] returning '115' as column: floor_op7_0_
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.type.StringType] returning '0070' as column: rc_id0_
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.loader.Loader] Initializing object from ResultSet: 29
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.loader.Loader] Hydrating entity: edu.mnscu.housing.vo.RoomPrefOption#29
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.type.StringType] returning '0070' as column: rc_id1_
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.type.StringType] returning 'D/S ' as column: val_code1_
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.type.StringType] returning 'Double as single ' as column: val_long5_1_
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.loader.Loader] Initializing object from ResultSet: MAPLE
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.loader.Loader] Hydrating entity: edu.mnscu.housing.vo.BldgPrefOption#MAPLE
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.type.StringType] returning 'Maple Hall ' as column: bldg_name2_
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.type.StringType] returning '0070' as column: rc_id2_
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.loader.Loader] Initializing object from ResultSet: 115
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.loader.Loader] Hydrating entity: edu.mnscu.housing.vo.CommunityPrefOption#115
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.type.StringType] returning '0070' as column: rc_id3_
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.type.StringType] returning 'FYRE ' as column: val_code3_
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.type.StringType] returning 'First Year Experience ' as column: val_long5_3_
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.loader.Loader] Initializing object from ResultSet: 0
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.loader.Loader] Hydrating entity: edu.mnscu.housing.vo.GenderPrefOption#0 //since outer left join been used, shouldn’t to resolve it if the obj is null. Seems to me it caused the mess, the record ‘566’ is missing.
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.type.StringType] returning null as column: val_code4_
2005-08-19 13:24:26,875 DEBUG [net.sf.hibernate.type.StringType] returning null as column: val_long4_4_ //should be LongType
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.type.LongType] returning null as column: sh_res_r1_0_ //should be ‘566’ instead of null
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.type.LongType] returning null as column: rpt_cent1_1_
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.type.StringType] returning 'MAPLE ' as column: bldg_code2_
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.type.LongType] returning '115' as column: rpt_cent1_3_
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.type.LongType] returning '0' as column: val_mast1_4_
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.loader.Loader] result row: null, null, MAPLE , 115, 0
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.type.LongType] returning '567' as column: sh_res_r1_0_
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.type.LongType] returning '29' as column: rpt_cent1_1_
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.type.StringType] returning 'OAK ' as column: bldg_code2_
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.type.LongType] returning '115' as column: rpt_cent1_3_
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.type.LongType] returning '0' as column: val_mast1_4_
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.loader.Loader] result row: 567, 29, OAK , 115, 0
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.loader.Loader] Initializing object from ResultSet: 567
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.loader.Loader] Hydrating entity: edu.mnscu.housing.vo.RoomPrefReservation#567
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.type.LongType] returning '973' as column: sh_res_r2_0_
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.type.IntegerType] returning '3' as column: rsrv_ran3_0_
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.type.StringType] returning 'OAK ' as column: bldg_code0_
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.type.LongType] returning '29' as column: room_typ5_0_
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.type.LongType] returning '0' as column: gender_o6_0_
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.type.LongType] returning '115' as column: floor_op7_0_
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.type.StringType] returning '0070' as column: rc_id0_
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.loader.Loader] Initializing object from ResultSet: OAK
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.loader.Loader] Hydrating entity: edu.mnscu.housing.vo.BldgPrefOption#OAK
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.type.StringType] returning 'Oak Hall ' as column: bldg_name2_
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.type.StringType] returning '0070' as column: rc_id2_
2005-08-19 13:24:26,890 DEBUG [net.sf.hibernate.loader.Loader] done processing result set (3 rows)
2005-08-19 13:24:26,906 DEBUG [net.sf.hibernate.impl.BatcherImpl] done closing: 0 open PreparedStatements, 0 open ResultSets
2005-08-19 13:24:26,906 DEBUG [net.sf.hibernate.impl.BatcherImpl] closing statement
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.loader.Loader] total objects hydrated: 7
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] resolving associations for [edu.mnscu.housing.vo.RoomPrefReservation#565]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] loading [edu.mnscu.housing.vo.Reservation#973]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] attempting to resolve [edu.mnscu.housing.vo.Reservation#973]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] resolved object in session cache [edu.mnscu.housing.vo.Reservation#973]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] loading [edu.mnscu.housing.vo.BldgPrefOption#MAPLE ]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] attempting to resolve [edu.mnscu.housing.vo.BldgPrefOption#MAPLE ]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] resolved object in session cache [edu.mnscu.housing.vo.BldgPrefOption#MAPLE ]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] loading [edu.mnscu.housing.vo.RoomPrefOption#29]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] attempting to resolve [edu.mnscu.housing.vo.RoomPrefOption#29]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] resolved object in session cache [edu.mnscu.housing.vo.RoomPrefOption#29]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] loading [edu.mnscu.housing.vo.GenderPrefOption#0]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] attempting to resolve [edu.mnscu.housing.vo.GenderPrefOption#0]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] resolved object in session cache [edu.mnscu.housing.vo.GenderPrefOption#0]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] loading [edu.mnscu.housing.vo.CommunityPrefOption#115]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] attempting to resolve [edu.mnscu.housing.vo.CommunityPrefOption#115]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] resolved object in session cache [edu.mnscu.housing.vo.CommunityPrefOption#115]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] done materializing entity [edu.mnscu.housing.vo.RoomPrefReservation#565]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] resolving associations for [edu.mnscu.housing.vo.RoomPrefOption#29]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] done materializing entity [edu.mnscu.housing.vo.RoomPrefOption#29]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] resolving associations for [edu.mnscu.housing.vo.BldgPrefOption#MAPLE ]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] done materializing entity [edu.mnscu.housing.vo.BldgPrefOption#MAPLE ]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] resolving associations for [edu.mnscu.housing.vo.CommunityPrefOption#115]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] done materializing entity [edu.mnscu.housing.vo.CommunityPrefOption#115]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] resolving associations for [edu.mnscu.housing.vo.GenderPrefOption#0]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] done materializing entity [edu.mnscu.housing.vo.GenderPrefOption#0]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] resolving associations for [edu.mnscu.housing.vo.RoomPrefReservation#567]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] loading [edu.mnscu.housing.vo.Reservation#973]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] attempting to resolve [edu.mnscu.housing.vo.Reservation#973]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] resolved object in session cache [edu.mnscu.housing.vo.Reservation#973]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] loading [edu.mnscu.housing.vo.BldgPrefOption#OAK ]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] attempting to resolve [edu.mnscu.housing.vo.BldgPrefOption#OAK ]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] resolved object in session cache [edu.mnscu.housing.vo.BldgPrefOption#OAK ]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] loading [edu.mnscu.housing.vo.RoomPrefOption#29]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] attempting to resolve [edu.mnscu.housing.vo.RoomPrefOption#29]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] resolved object in session cache [edu.mnscu.housing.vo.RoomPrefOption#29]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] loading [edu.mnscu.housing.vo.GenderPrefOption#0]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] attempting to resolve [edu.mnscu.housing.vo.GenderPrefOption#0]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] resolved object in session cache [edu.mnscu.housing.vo.GenderPrefOption#0]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] loading [edu.mnscu.housing.vo.CommunityPrefOption#115]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] attempting to resolve [edu.mnscu.housing.vo.CommunityPrefOption#115]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] resolved object in session cache [edu.mnscu.housing.vo.CommunityPrefOption#115]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] done materializing entity [edu.mnscu.housing.vo.RoomPrefReservation#567]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] resolving associations for [edu.mnscu.housing.vo.BldgPrefOption#OAK ]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] done materializing entity [edu.mnscu.housing.vo.BldgPrefOption#OAK ]
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] initializing non-lazy collections
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] flushing session
DEBUG [net.sf.hibernate.impl.Printer] listing entities:
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.Printer] edu.mnscu.housing.vo.BldgPrefOption{rcId=0070, bldgName=Maple Hall , id=MAPLE }
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.Printer] edu.mnscu.housing.vo.RoomPrefReservation{rcId=0070, roomType=RoomPrefOption#29, bldg=BldgPrefOption#OAK , floorGender=GenderPrefOption#0, rankNumber=3, reservation=Reservation#973, community=CommunityPrefOption#115, id=567}
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.Printer] edu.mnscu.housing.vo.RoommatePrefOption{code=ERLY , rcId=0070, descr=Early Riser , id=116}
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.Printer] edu.mnscu.housing.vo.ReservationNamedRmmt{rmmtLocPref=RmmtLocPrefOption#10, inputRmmtName=nnn , rmmtTechId=00000002, rmmtRcId=0070, reservation=Reservation#973, id=301}
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.Printer] edu.mnscu.housing.vo.BldgPrefOption{rcId=0070, bldgName=Oak Hall , id=OAK }
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.Printer] edu.mnscu.housing.vo.GenderPrefOption{code=null, descr=null, id=0}
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.Printer] edu.mnscu.housing.vo.RoomPrefOption{code=D/S , rcId=0070, descr=Double as single , id=29}
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.Printer] edu.mnscu.housing.vo.RoomPrefReservation{rcId=0070, roomType=RoomPrefOption#29, bldg=BldgPrefOption#MAPLE , floorGender=GenderPrefOption#0, rankNumber=1, reservation=Reservation#973, community=CommunityPrefOption#115, id=565}
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.Printer] edu.mnscu.housing.vo.CommunityPrefOption{code=FYRE , rcId=0070, descr=First Year Experience , id=115}
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.Printer] edu.mnscu.housing.vo.Reservation{rcId=0070, updateTime=null, specialAccom=null, cancelTime=null, smokeId=3, id=973, rankedRoomPrefs=uninitialized, techId=00261867, rmmatePrefs=[RoommatePrefReservation#176], namedRmmts=[ReservationNamedRmmt#301], createTime=null, fallTerm=Y, cancelReasonId=null, fiscalYear=2006, campusId=070, typeCode=N, futureContact=null, springTerm=Y, updateUser=null}
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.Printer] edu.mnscu.housing.vo.RmmtLocPrefOption{code=F , descr=Same Floor , id=10}
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.Printer] edu.mnscu.housing.vo.RoommatePrefReservation{roommatePref=RoommatePrefOption#116, reservation=Reservation#973, id=176}
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] executing flush
2005-08-19 13:24:26,937 DEBUG [net.sf.hibernate.impl.SessionImpl] post flush
2005-08-19 13:24:26,937 DEBUG [edu.mnscu.housing.dao.hibernate.ReservationHibernateDaoImpl] Room prefs list size=3
2005-08-19 13:24:26,937 DEBUG [edu.mnscu.housing.dao.hibernate.ReservationHibernateDaoImpl] rmrsrv=565
2005-08-19 13:24:26,937 DEBUG [edu.mnscu.housing.dao.hibernate.ReservationHibernateDaoImpl] rmrsrv=null //should be '566'
2005-08-19 13:24:26,937 DEBUG [edu.mnscu.housing.dao.hibernate.ReservationHibernateDaoImpl] rmrsrv=567
2005-08-19 13:24:26,937 DEBUG [edu.mnscu.housing.dao.hibernate.ReservationHibernateDaoImpl] getReservation, return with collections true
2005-08-19 13:24:26,937 INFO [edu.mnscu.housing.business.ReservationServiceEjbImpl] <<<getReservation


Top
 Profile  
 
 Post subject: Re: 'null' object is returned in query result list.
PostPosted: Wed Aug 31, 2005 4:06 pm 
Beginner
Beginner

Joined: Tue May 17, 2005 9:10 am
Posts: 29
Our workaround is map to fk-ids instead of many-to-one object, do separate query to get 'one' object then set obj back as a trasient field. So that no changes on client side. Since i have 3 test rows with null simple fk-ids, all are returned , the case2 shouldn't be a problem.


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.