orientdb icon indicating copy to clipboard operation
orientdb copied to clipboard

Allow preservation of null fields when using projections

Open buzzkillington opened this issue 11 years ago • 3 comments

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
----+-----+-------------------

buzzkillington avatar Jan 07 '15 20:01 buzzkillington

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.

tdhung80 avatar Jan 16 '15 03:01 tdhung80

This is definitely a bug. I'm working on it.

lvca avatar Jan 16 '15 14:01 lvca

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.

swruble avatar Jun 20 '15 20:06 swruble