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

Cannot delete edge in StrictMode #5051

Closed
alpeshgaglani opened this issue Oct 2, 2015 · 1 comment
Closed

Cannot delete edge in StrictMode #5051

alpeshgaglani opened this issue Oct 2, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@alpeshgaglani
Copy link

I am using version 2.1.2. Due to a variety of security related concerns, our schema is defined in the strict mode = true. There's a specific case where I cannot delete edges. Here's how to repro:
create class V1 extends V
create class V2 extends V
alter class V1 strictmode true
alter class V2 strictmode true
create class V1ToV2 extends E
alter class V1ToV2 strictmode true
create property V1ToV2.out LINK V1
create property V1ToV2.in LINK V2
create property V1.out_V1ToV2 LINKLIST V1ToV2
create property V2.in_V1ToV2 LINKLIST V1ToV2
create vertex V1
create vertex V2
create edge V1ToV2 from (select from V1) to (select from V2)
create vertex V1
create edge V1ToV2 from #42:1 to (select from V2)
delete edge V1ToV2 from #42:1 to (select from V2)

Error: com.orientechnologies.orient.core.exception.OValidationException: The field 'V2.in_V1ToV2' has been declared as LINKLIST but an incompatible type is used. Value: [V1ToV2#44:0{out:#42:0,in:#43:0} v1]

I believe this repros if two vertices have an outgoing edge to a third vertex, and if you try to delete one of those edges.
I have been struggling with this for a bit, and see a related issue #3534, which was closed as invalid. But it's clearly the case for me. Any help in fixing this is greatly appreciated!

@lvca lvca self-assigned this Oct 4, 2015
@lvca lvca added this to the 2.1.x (next hotfix) milestone Oct 4, 2015
@lvca lvca added the bug label Oct 4, 2015
lvca added a commit that referenced this issue Oct 4, 2015
Found the problem: on edge removal the setting
graph.isAutoScaleEdgeType() is not considered, and a collection is
transformed on single value.
@lvca
Copy link
Member

lvca commented Oct 4, 2015

Found the problem: on edge removal the setting graph.isAutoScaleEdgeType() is not considered, and a collection is transformed on single value. Fixed in 2.1.3.

@lvca lvca closed this as completed Oct 4, 2015
@lvca lvca modified the milestones: 2.1.x (next hotfix), 2.1.3 Oct 4, 2015
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