-->
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/Example excludeNone()/excludeZeroes() and boolean
PostPosted: Sun Jul 18, 2004 8:28 am 
Regular
Regular

Joined: Mon Oct 06, 2003 1:59 am
Posts: 52
Hi Folks,

I proven that enableLike works with values of component objects:

Code:
Criteria critera = createCriteria();         
         critera.add(Example.create(contactCriteria)
                .excludeNone()
                .excludeProperty("online")
                .excludeProperty("readingEmail")
                .excludeProperty("readingTechnicalLiterature")
                .excludeZeroes()           // exclude zero valued properties                                  
                .enableLike()              // use like for string comparisons
                );


Unfortunaly I have to drop all boolean values as neither excludeNone nor excludeZeroes drop them automatically. Do I am something wrong or this is a bug?

Thx
Toby

_________________
"Wisest of the Maia was Ol


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 18, 2004 10:43 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
This is fine. BTW, you can write your own PropertySelector, or use Boolean as the property type.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 18, 2004 12:56 pm 
Regular
Regular

Joined: Mon Oct 06, 2003 1:59 am
Posts: 52
gavin wrote:
This is fine. BTW, you can write your own PropertySelector, or use Boolean as the property type.


Ahhhh... I will review that thx. Can I use the PropertySelector to check for CustomTypes (I use CustomType to map my commons-lang enums ). ????

_________________
"Wisest of the Maia was Ol


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.