-->
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: Hibernate3 Criteria with Spring Framework
PostPosted: Thu Aug 04, 2005 5:02 pm 
Beginner
Beginner

Joined: Thu Mar 31, 2005 9:58 pm
Posts: 25
Location: Valparaiso
Hibernate version: 3

How can I use Hibernate3 Criteria with Spring framework using getHibernateTemplate() method?

_________________
Daniel Casanueva R.

Jcode
Valparaiso, Chile


Top
 Profile  
 
 Post subject: spring
PostPosted: Thu Aug 04, 2005 5:55 pm 
Expert
Expert

Joined: Fri Jul 22, 2005 2:42 pm
Posts: 670
Location: Seattle, WA
I guess you simply should use classes from
org.springframework.orm.hibernate3 package. They have the same names as ones in org.springframework.orm.hibernate but H session will have the criteria API. Your class will extend
[b]org.springframework.orm.hibernate3.support.HibernateDaoSupport[b]


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 04, 2005 5:56 pm 
Beginner
Beginner

Joined: Thu Mar 31, 2005 9:58 pm
Posts: 25
Location: Valparaiso
I resolve that with in a really simple way: without hibernateTemplate();

---->

Criteria crit = getSession().createCriteria(Empresa.class);

that's all!

_________________
Daniel Casanueva R.

Jcode
Valparaiso, Chile


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.