-->
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.  [ 1 post ] 
Author Message
 Post subject: query by Example
PostPosted: Fri Mar 11, 2005 6:34 pm 
Newbie

Joined: Fri Mar 11, 2005 6:26 pm
Posts: 2
I have a quick question regarding Example query usage. If I have a class that has a city, state and country field and I want to query by those 3 fields only. My persistent class has 20 fields in total so do I have to use the Example.excludeProperty() method for all 17 fields? The reason I ask is the output in the log file is showing all the fields in the where clause like:
... lower(this_.city)=? and lower(this_.country_code)=? and lower(this_.state_province)=? and field=? and field2=? and field3=? and field4=?, etc. etc.

The queries aren't returning any values. All the fields are null values upon creation of the class so I thought those weren't supposed to be included according to the docs.

I'm using Hibernate 3.0RC1, JBoss 4.0.1SP1, Java 1.4.2_05 on Mac OS X.

Thanks for any help.

Mike


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.