Skip to content

Update edge | unable to change the edge endpoint #8406

@gtadudeps

Description

@gtadudeps

OrientDB Version: v3.0.3

Java Version: 8

OS: macOS High Sierra

Expected behavior

On issuing update edge command the endpoint should update. This worked in v2.2.35 but its not working in v3.0.3.

Actual behavior

It's throwing a error saying out is not a vertex and is failing on validateOutInForEdge.

`com.orientechnologies.orient.core.exception.OCommandExecutionException: Error updating edge: 'out' is not a vertex - [V#9:0{name:a} v1]
DB name="test"
at com.orientechnologies.orient.core.sql.executor.UpdateEdgePointersStep.validateOutInForEdge(UpdateEdgePointersStep.java:126)
at com.orientechnologies.orient.core.sql.executor.UpdateEdgePointersStep.handleUpdateEdge(UpdateEdgePointersStep.java:86)
at com.orientechnologies.orient.core.sql.executor.UpdateEdgePointersStep.access$000(UpdateEdgePointersStep.java:16)
at com.orientechnologies.orient.core.sql.executor.UpdateEdgePointersStep$1.next(UpdateEdgePointersStep.java:35)
at com.orientechnologies.orient.core.sql.executor.SaveElementStep$1.next(SaveElementStep.java:37)
at com.orientechnologies.orient.core.sql.executor.CountStep.syncPull(CountStep.java:53)
at com.orientechnologies.orient.core.sql.executor.OSelectExecutionPlan.fetchNext(OSelectExecutionPlan.java:37)
at com.orientechnologies.orient.core.sql.executor.OUpdateExecutionPlan.executeInternal(OUpdateExecutionPlan.java:46)
at com.orientechnologies.orient.core.sql.parser.OUpdateStatement.execute(OUpdateStatement.java:144)
at com.orientechnologies.orient.core.sql.parser.OStatement.execute(OStatement.java:59)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentEmbedded.command(ODatabaseDocumentEmbedded.java:540)
at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommand.executeStatement(OServerCommandPostCommand.java:175)
at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommand.execute(OServerCommandPostCommand.java:84)
at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommandGraph.execute(OServerCommandPostCommandGraph.java:36)
at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:172)
at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:633)
at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:82)
Internal server error:

com.orientechnologies.orient.core.exception.OCommandExecutionException: Error updating edge: 'out' is not a vertex - [V#9:0{name:a} v1]
DB name="test"
at com.orientechnologies.orient.core.sql.executor.UpdateEdgePointersStep.validateOutInForEdge(UpdateEdgePointersStep.java:126)
at com.orientechnologies.orient.core.sql.executor.UpdateEdgePointersStep.handleUpdateEdge(UpdateEdgePointersStep.java:86)
at com.orientechnologies.orient.core.sql.executor.UpdateEdgePointersStep.access$000(UpdateEdgePointersStep.java:16)
at com.orientechnologies.orient.core.sql.executor.UpdateEdgePointersStep$1.next(UpdateEdgePointersStep.java:35)
at com.orientechnologies.orient.core.sql.executor.SaveElementStep$1.next(SaveElementStep.java:37)
at com.orientechnologies.orient.core.sql.executor.CountStep.syncPull(CountStep.java:53)
at com.orientechnologies.orient.core.sql.executor.OSelectExecutionPlan.fetchNext(OSelectExecutionPlan.java:37)
at com.orientechnologies.orient.core.sql.executor.OUpdateExecutionPlan.executeInternal(OUpdateExecutionPlan.java:46)
at com.orientechnologies.orient.core.sql.parser.OUpdateStatement.execute(OUpdateStatement.java:144)
at com.orientechnologies.orient.core.sql.parser.OStatement.execute(OStatement.java:59)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentEmbedded.command(ODatabaseDocumentEmbedded.java:540)
at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommand.executeStatement(OServerCommandPostCommand.java:175)
at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommand.execute(OServerCommandPostCommand.java:84)
at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommandGraph.execute(OServerCommandPostCommandGraph.java:36)
at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:172)
at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:633)`

Steps to reproduce

create vertex v set name = 'a'; --> #9:0
create vertex v set name = 'b'; --> #10:0
create vertex v set name = 'c'; --> #11:0

create edge e from #10:0 to #11:0; --> #17:0

update edge e set out = (select from v where name = 'a' ) where @rid = #17:0

Metadata

Metadata

Labels

buglegacy not used anymore

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions