-->
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 bug?
PostPosted: Fri Apr 18, 2008 8:23 pm 
Newbie

Joined: Fri Apr 18, 2008 8:12 pm
Posts: 1
Hello all,

I have a question regarding Querying By Example.

I understand that:
"Version properties, identifiers and associations are ignored. By default, null valued properties are excluded"

But how come the "" string valued properties are also excluded?

I have a user in the database, say userInDatabase, like
lastName = "lname"
firstName = "fname"
middleName = "mname"

And I want to query the database with an userExample created as
userExample.lastName = "lname"
userExample.firstName = "fname"
userExample.middleName = ""

The result I was expecting should be 0 matching rows.
However it returns the user with middleName as "mname", the result is
the same as when I use userExample2 as follows
userExample.lastName = "lname"
userExample.firstName = "fname"
userExample.middleName = null

However from the document, it did not say that the empty string valued
property will be excluded too.

Any thought?

Thanks.


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.