-->
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.  [ 5 posts ] 
Author Message
 Post subject: The method createQuery is deprecated?
PostPosted: Thu Jul 07, 2005 5:31 am 
Beginner
Beginner

Joined: Thu Jul 07, 2005 5:17 am
Posts: 30
Hi all,

When I wrote codes below :
Query q =getHibernateTemplate().createQuery(
getHibernateTemplate().getSessionFactory().openSession(),
"from Resource as i");
q.setFirstResult(start);
q.setMaxResults(num);
resList=q.list();

eclipse warned that :
The method createQuery(Session, String) from the type HibernateTemplate is deprecated


how can i do about the situation?
PLEASE HELP.

Hibernate version:
Hibernate 2.17


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 07, 2005 8:28 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Don't use Spring with Hibernate if you don't have a good reason to do this. Hibernate has been designed to be used directly, without a wrapper framework. If you insist you need Spring, ask the question in their forum.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 08, 2005 4:35 am 
Beginner
Beginner

Joined: Thu Jul 07, 2005 5:17 am
Posts: 30
any body help me?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 08, 2005 4:52 am 
Expert
Expert

Joined: Tue Oct 05, 2004 9:45 am
Posts: 263
why don't you do what Christian has told you? This seems to be a Spring and NOT a hibernate problem ...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 01, 2005 9:50 pm 
spring problem


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