-->
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: org.hibernate.criterion.Example - 'OR' style
PostPosted: Sat Aug 30, 2008 12:43 pm 
Regular
Regular

Joined: Fri Jul 30, 2004 4:02 pm
Posts: 50
Hibernate 3.2.4.ga


Is there a way to use the org.hibernate.criterion.Example to also do a non-null 'OR' style search (including enableLike, enableIgnoreCase, etc)?

Or another way that doesn't involve a lot of flow-control code to build up an HQL/JPA-QL query?

thanky,
-D


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 31, 2008 5:17 am 
Regular
Regular

Joined: Wed Jan 11, 2006 12:49 pm
Posts: 64
Location: Campinas, Brazil
do you mean this:
Code:
criteria.add(new Disjunction(Expression.isNull("x"), Expression.eq("x", param)));

?

_________________
Henrique Sousa
Don't forget to rate useful responses


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.