-->
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.  [ 3 posts ] 
Author Message
 Post subject: General Question
PostPosted: Fri Nov 09, 2007 10:14 am 
Newbie

Joined: Tue May 08, 2007 3:34 pm
Posts: 19
I am querying a record in a table and two rows are found. If I have any null values in any fields then the rows for all fields become null.

For example,
row 1
col a = aba
col b = cbc
col c = dfd
col d = fff

row 2
col a = ba
col b = bc
col c = fd
col d = ff

Then the object is created correctly with the data as:
Objects 1 and two are as follow:
aba, cbc, dfd, fff
ba, bc, fd, ff

In this case though:

row 1
col a = aba
col b = cbc
col c = null
col d = fff

row 2
col a = ba
col b = bc
col c = fd
col d = ff

Then the object is created correctly with the data as:
Objects 1 and two are as follow:
null, null, null, null
ba, bc, fd, ff

Any ideas why?
Thanks,
Joe Russo


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 09, 2007 11:55 am 
Newbie

Joined: Tue May 08, 2007 3:34 pm
Posts: 19
After looking further into the log files it indicates that two rows are found, but only one row is hydrated.

09 Nov 2007 10:09:42 [5_623=WebEcommerceSetup] DEBUG -done processing result set (2 rows)
09 Nov 2007 10:09:42 [5_623=WebEcommerceSetup] DEBUG -about to close ResultSet (open ResultSets: 1, globally: 1)
09 Nov 2007 10:09:42 [5_623=WebEcommerceSetup] DEBUG -about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
09 Nov 2007 10:09:42 [5_623=WebEcommerceSetup] DEBUG -closing statement
09 Nov 2007 10:09:42 [5_623=WebEcommerceSetup] DEBUG -total objects hydrated: 1


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 09, 2007 4:20 pm 
Newbie

Joined: Tue May 08, 2007 3:34 pm
Posts: 19
I found the problem. This was related to mapping the table correctly. I had it originally within the composite id element. Once I move it out of the composite id then restarted it worked fine.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.