-->
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: methods of search with criteria
PostPosted: Mon May 24, 2010 5:38 am 
Newbie

Joined: Sat Apr 10, 2010 9:12 am
Posts: 6
hi everybody,

i'm using criteria to find object from database
i gave the primary key(String) and ask to retreive the corresponding object i used restrictions.eq() but it didn't work and restrictions.like() returns all the object that primary key looks like what i give
can you tell me what method to use in order to retreive just the required object
thank you.


Top
 Profile  
 
 Post subject: Re: methods of search with criteria
PostPosted: Mon May 24, 2010 11:40 am 
Regular
Regular

Joined: Tue May 11, 2010 5:50 pm
Posts: 54
Location: Norman, Ok, U.S.A
Can you post your criteria. And make sure the key that you are using right type for the key. If you are entering it as String, make sure it is a String in the DB also.


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.