-->
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: need help in DetachCriteria
PostPosted: Mon May 04, 2009 9:23 am 
Beginner
Beginner

Joined: Fri Feb 20, 2009 2:19 am
Posts: 33
Suppose my table structure is

id varchar2 primary key,
name varchar2 ,
data varchar2


now if i want to fetch all the objects having data as"Hello World"
using DetachCriterai how can i do it?


Top
 Profile  
 
 Post subject: Re: need help in DetachCriteria
PostPosted: Mon May 04, 2009 1:53 pm 
Newbie

Joined: Mon May 04, 2009 1:39 pm
Posts: 4
DetachedCriteria query = DetachedCriteria.forClass(table_class_name.class).add(Property.forName("data").eq("Hello World"));

Inside a session call

List results = query.getExecutableCriteria(session).list();


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.