-->
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.  [ 4 posts ] 
Author Message
 Post subject: Reg : Criteria having where clause?
PostPosted: Fri Mar 13, 2009 5:19 am 
Newbie

Joined: Fri Jan 02, 2009 2:14 am
Posts: 15
HI

Criteria having where clause? if have give me example hibernate query using criteria where clause?


Top
 Profile  
 
 Post subject: Re: Reg : Criteria having where clause?
PostPosted: Fri Mar 13, 2009 5:26 am 
Senior
Senior

Joined: Wed Sep 19, 2007 9:31 pm
Posts: 191
Location: Khuntien (Indonesia)
ecpfriends99 wrote:
HI

Criteria having where clause? if have give me example hibernate query using criteria where clause?


A lot of samples you can search at google.

Code:
Criteria crit = session.createCriteria(SomeClass.class);
crit.add(Restrictions.eq("property", value));


Top
 Profile  
 
 Post subject: reg Joins,
PostPosted: Fri Mar 13, 2009 5:57 am 
Newbie

Joined: Fri Jan 02, 2009 2:14 am
Posts: 15
Hi
I have 2 classes A,B
how to join the query in criteria ?


Top
 Profile  
 
 Post subject: Re: reg Joins,
PostPosted: Fri Mar 13, 2009 5:59 am 
Senior
Senior

Joined: Wed Sep 19, 2007 9:31 pm
Posts: 191
Location: Khuntien (Indonesia)
ecpfriends99 wrote:
Hi
I have 2 classes A,B
how to join the query in criteria ?



http://www.javalobby.org/articles/hibernatequery102/?source=archives

Please rate if it can solve your problem ;)


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