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

LINKMAP doesn't work with subquery #8646

Closed
freeart opened this issue Nov 5, 2018 · 2 comments
Closed

LINKMAP doesn't work with subquery #8646

freeart opened this issue Nov 5, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@freeart
Copy link

freeart commented Nov 5, 2018

OrientDB Version: 3.1.0 from develop branch

Java Version: docker openjdk:8-jdk-alpine

OS: docker openjdk:8-jdk-alpine

Expected behavior

Should work like

INSERT INTO Test (mymap) VALUES ({'A-1': #xx:x});

LINKSET, LINKLIST, LINK, EMBEDDEDSET, EMBEDDEDLIST, EMBEDDED work fine with subquery syntax

Actual behavior

com.orientechnologies.orient.core.exception.OValidationException: The field 'Test.mymap' has been declared as LINKMAP but the value is not a record or a record-id DB name="nvd" Error Code="4"

Steps to reproduce

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

INSERT INTO TestMap (name) VALUES ('test');
INSERT INTO Test (mymap) VALUES ({'A-1': (SELECT FROM TestMap WHERE name = 'test')});
@luigidellaquila luigidellaquila self-assigned this Nov 5, 2018
luigidellaquila added a commit that referenced this issue Nov 6, 2018
@luigidellaquila
Copy link
Member

Hi @freeart

I just pushed a fix to both 3.0.x and develop branches, now it should be OK

Thanks

Luigi

@luigidellaquila
Copy link
Member

Mmm... it seems I have to revert the fix on develop branch, there is one failing test.
Anyway, I'm working on it, I'll provide a new fix soon

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