-->
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: Query in getHibernateTemplate.find()
PostPosted: Fri Jul 07, 2006 6:47 am 
Newbie

Joined: Fri Jul 07, 2006 6:41 am
Posts: 1
Can we use like queries in getHibernateTemplate.find()?
For example find("select * from sometable where fName like", "'%name%'");
Any help on this topic would be appreciated.


Top
 Profile  
 
 Post subject: Re: Query in getHibernateTemplate.find()
PostPosted: Fri Jul 07, 2006 10:46 am 
Expert
Expert

Joined: Tue Dec 28, 2004 7:02 am
Posts: 573
Location: Toulouse, France
jayan wrote:
Can we use like queries in getHibernateTemplate.find()?
For example find("select * from sometable where fName like", "'%name%'");
Any help on this topic would be appreciated.


Except from the fact that your HQL seems to be speaking of table instead of entity, yes : http://www.hibernate.org/hib_docs/v3/re ... hql-select
Didn't you try it before asking ?

_________________
Baptiste
PS : please don't forget to give credits below if you found this answer useful :)


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.