Allow preservation of null fields when using projections
Using OrientDB-community 1.7.9, fieldB gets dropped in the second query below. It would be useful to have an optional keyword that instructs Orient to include/retain null fields when using projections (or any applicable operation). This capability should also be exposed via the Java API.
See also this Group topic.
select * from SomeObject where @rid=#13:0
----+-----+---------------------
# |@RID |fieldA |fieldB|fieldC
----+-----+---------------------
0 |#13:0|"foo" |null |#15:19
----+-----+---------------------
select *, @rid as id from SomeObject where @rid=#13:0
----+-----+-------------------
# |@RID |fieldA|fieldC|id
----+-----+-------------------
0 |#13:0|"foo" |#15:19|#13:0
----+-----+-------------------
Just want to confirm that it happens on any earlier version as well. It is very annoying, but It seems to be a default behavior.
This is definitely a bug. I'm working on it.
Ivca, it seems this issue was supposedly fixed, but I'm encountering the same issue now using version: 2.0.9. When the first record contains null fields, those fields are missing even if later records contain values in these fields. Changing only the sort order so first record contains no null fields, all fields are returned in result set.