-
Notifications
You must be signed in to change notification settings - Fork 21
Description
Hello,
Seems like retrieving records that have a value in a emeddedmap other than a simple value (string or integer) doesn't parse well.
I have created a class "test" and added a "name" property of type embeddedmap without linked-type.
create class test;
create property test.name embeddedmap;
Added a registry to test it:
insert into test (@Class, name) values ('Test', {"es": ["a", "b"], "en": ["c"]});
I can make queries at the console:
orientdb> select from test where name.es contains 'a'
----+-----+-------------------
|@Rid |name
----+-----+-------------------
0 |#33:0|{en=[c], es=[a, b]}
----+-----+-------------------
Everything works fine. Making a query with the binary, the decoded value is not the expected:
content: 'test@name:{"en":["c"],"es":["a","b"]}'
data->name: empty
data->es: ['a', 'b' ]
data->en: [ 'c' ]
This is the expected result:
content: 'test@name:{"en":["c"],"es":["a","b"]}'
data->name: [ 'es' : [ 'a', 'b' ], 'en' : [ 'c' ]]
data->name['es']: [ 'a', 'b' ]
data->name['en']: [ 'c' ]
Looks like the decode() method is not considering arrays or other complex values as a value for an embeddedmap.
This feature could be related to the issues 26: #26, and 16: #16, is not the exact same bug, but involves nested values too.
Regards!