Reputation: 85
Seem that OrientDB doesn't return the correct result for the simple search.
I created a class node item
with 2 properties id
and flag
id
: type STRING, index: UNIQUEflag
: type DECIMALflag
can be set by 1
, 0
, or null
value.
I use the query below to get all item
which has flag
is 1
`select from item where flag = 1`
But the query returns nothing.
Note: I have tested on 2.2.7
and 2.2.10
, and seem that this issue only occurs if flag
was defined in schema before feeding data.
Is it bug?
UPDATED: Added sample database. Get it here
Upvotes: 0
Views: 52
Reputation: 3570
If you use select from item where 1 = flag
it works.
For your query select from item where flag = 1
could you open an issue on github attaching your database ?
Upvotes: 1
Reputation: 1369
Tested on 2.2.10, no problems here:
create class item extends v
create property item.id STRING
create property item.flag DECIMAL
insert into item(id,flag) values ("id1",1)
select from item where flag = 1
Also added UNIQUE
index on id
from studio -> schema.
Upvotes: 1