-->
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: Problem with Criteria 'or' when used with 'in'
PostPosted: Thu Dec 12, 2013 3:11 pm 
Newbie

Joined: Thu Dec 12, 2013 2:55 pm
Posts: 1
Hi,

I am having a issue with criteria 'or' condition when I use 'in' condition as one of its parameters. I am not getting correct results
For example I have two tables

Account with many columns like {
id
accountName
accountNumber
AccountType accountType
}

AccountType table {
id
accountTypeName
}

I have some test data like

id account_name account_number account_type_id
1 Google GOO01 1
2 Amazon AMZ02 2
3 ebay eby03 null

accountType table data

id account_type_name
1 Analyst
2 Customer

now if I create a query like

accouname eq = ebay 'or' account_type in(Analys, customer)

I am only getting Google and Amazon but according to my query I should get ebay as well, but I am not getting the desired result.

Now if I change account_type value to some value like 'vendor'.

Now with the same above query I am getting correct results. I am facing a problem when ever account_type is 'null'

Can anyone tell me what's going on here. How can I get the correct results for that query


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.