Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAPLINK expanding as mapfield:{*:{name}} doesn't work #8662

Closed
freeart opened this issue Nov 15, 2018 · 1 comment
Closed

MAPLINK expanding as mapfield:{*:{name}} doesn't work #8662

freeart opened this issue Nov 15, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@freeart
Copy link

freeart commented Nov 15, 2018

OrientDB Version: 3.1.0 from develop branch

Java Version: docker openjdk:8-jdk-alpine

OS: docker openjdk:8-jdk-alpine

Expected behavior

{"A1":{"name":"test"},"A2":{"name":"test"}}

Actual behavior

{"A1":"#23:0","A2":"#23:0"}

Steps to reproduce

CREATE CLASS Test;
CREATE CLASS TestMap;
CREATE PROPERTY Test.mymap LINKMAP TestMap;
CREATE PROPERTY Test.id STRING;

INSERT INTO TestMap (name) VALUES ('test');
INSERT INTO Test SET id = "123", mymap = {};

UPDATE Test SET mymap['A1'] = (SELECT FROM TestMap WHERE name = 'test') WHERE id = "123"
UPDATE Test SET mymap['A2'] = (SELECT FROM TestMap WHERE name = 'test') WHERE id = "123"
...
SELECT mymap:{*:{name}} FROM Test where id = "123"
// {"A1":"#23:0","A2":"#23:0"}
SELECT mymap:{*:{*}} FROM Test where id = "123"
// {"A1":"#23:0","A2":"#23:0"}
SELECT mymap:{"A1":{name},"A2":{name}} FROM Test where id = "123"
// {"A1":{"name":"test"},"A2":{"name":"test"}}
@freeart freeart changed the title MAPLINK EXPAND as mapfield:{*:{name}} doesn't work MAPLINK expanding as mapfield:{*:{name}} doesn't work Nov 15, 2018
@luigidellaquila
Copy link
Member

Hi @freeart

I just pushed a fix, it will be available in next 3.1 snapshot and in v 3.0.11

Thanks

Luigi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants