-->
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: Hibernate returns List of null objects
PostPosted: Tue Feb 16, 2010 5:32 pm 
Newbie

Joined: Wed Feb 10, 2010 3:13 pm
Posts: 3
Am using Hibernate 3.3.2.GA, Hibernate Annotations 3.4.0.GA, Java 1.5

Table name - Table 1
When i retrieve the list of rows(63 total) from the Table1 the hibernate returns
the List of null objects(63) whose count is same as row count of the table.

Can you please point me where am i going wrong here?.


Top
 Profile  
 
 Post subject: Re: Hibernate returns List of null objects
PostPosted: Tue Feb 16, 2010 5:52 pm 
Newbie

Joined: Wed Feb 10, 2010 3:13 pm
Posts: 3
i've used both find and loadAll method

getHibernateTemplate().loadAll(clazz);and getHibernateTemplate().find(" from "+clazz.getName());

no result.I mean null objects as a result.


Top
 Profile  
 
 Post subject: Re: Hibernate returns List of null objects
PostPosted: Tue Feb 23, 2010 4:23 pm 
Beginner
Beginner

Joined: Tue Aug 25, 2009 11:42 am
Posts: 49
where did u see that they were null? Did u iterate through the returned list? I believe u got a lazy list but if u iterated while the transaction were active, you should get the objects loaded.


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.