0
votes


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: UNIQUE
  • flag: type DECIMAL

flag 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?

imageUPDATED: Added sample database. Get it here

2

2 Answers

1
votes

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 ?

1
votes

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.

Output: Select ID OrientDB