-->
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: Criteria for >=
PostPosted: Tue Jan 11, 2011 9:46 am 
Newbie

Joined: Tue Nov 02, 2010 8:04 am
Posts: 4
Hello Friend,
I have one problem with one Query. This query :
Code:
SELECT *FROM tab where price>=100000


as the trasformation in criteria? Thanks^^


Top
 Profile  
 
 Post subject: Re: Criteria for >=
PostPosted: Wed Jan 12, 2011 5:13 am 
Newbie

Joined: Tue Nov 02, 2010 8:04 am
Posts: 4
ycmy96385 i do not believe that your response has sense with my question...


Top
 Profile  
 
 Post subject: Re: Criteria for >=
PostPosted: Thu Jan 20, 2011 5:56 pm 
Newbie

Joined: Fri Jan 07, 2011 7:23 am
Posts: 19
Something like:
Code:
        CriteriaBuilder cb = em.getCriteriaBuilder();
        CriteriaQuery<Tab> query = cb.createQuery(Tab.class);
        Root<Tab> tab = query.from(Tab.class);
        query.select(tab);
        query.where(cb.greaterThanOrEqualTo(tab.get(Tab_.prices), cb.literal(10000));


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.