OrientDB is the most versatile DBMS supporting Graph, Document, Reactive, Full-Text and Geospatial models in one Multi-Model product. OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, Full-Text indexing and Reactive Queries.
Trying to delete record with SQL: DELETE EDGE EDGE_NAME TO (SELECT FROM ENTITY_NAME WHERE entityId=:entityId AND integrationId=:integrationId AND type=:type)
And OrientDB deletes it, but when Im trying to run this query again he throws error
I also have index: (entityId, integrationId, type)
entityId: string
integrationId: string
type: int
lightweightEdges enabled
UPD: works well without lightweight edges
java.lang.NullPointerException
at java.util.Objects.requireNonNull(Objects.java:203)
at java.util.Optional.<init>(Optional.java:96)
at java.util.Optional.of(Optional.java:108)
at com.orientechnologies.orient.core.sql.executor.OResultInternal.getIdentity(OResultInternal.java:330)
at com.orientechnologies.orient.core.sql.executor.DeleteStep.mapResult(DeleteStep.java:30)
at com.orientechnologies.orient.core.sql.executor.DeleteStep.lambda$syncPull$0(DeleteStep.java:24)
at com.orientechnologies.orient.core.sql.executor.resultset.OResultSetMapper.next(OResultSetMapper.java:28)
at com.orientechnologies.orient.core.sql.executor.CountStep.syncPull(CountStep.java:52)
at com.orientechnologies.orient.core.sql.executor.OSelectExecutionPlan.fetchNext(OSelectExecutionPlan.java:35)
at com.orientechnologies.orient.core.sql.executor.OUpdateExecutionPlan.executeInternal(OUpdateExecutionPlan.java:41)
at com.orientechnologies.orient.core.sql.parser.ODeleteEdgeStatement.execute(ODeleteEdgeStatement.java:58)
at com.orientechnologies.orient.core.sql.parser.ODeleteEdgeStatement.execute(ODeleteEdgeStatement.java:71)
at com.orientechnologies.orient.core.sql.parser.OStatement.execute(OStatement.java:76)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentEmbedded.command(ODatabaseDocumentEmbedded.java:633)
at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommand.executeStatement(OServerCommandPostCommand.java:221)
at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommand.execute(OServerCommandPostCommand.java:104)
at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommandGraph.execute(OServerCommandPostCommandGraph.java:34)
at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:242)
at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:800)
at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:68)
OrientDB Version: 3.2.30
Java Version: running in official docker image
OS: running in official docker image
Expected behavior
Trying to delete record with SQL:
DELETE EDGE EDGE_NAME TO (SELECT FROM ENTITY_NAME WHERE entityId=:entityId AND integrationId=:integrationId AND type=:type)
And OrientDB deletes it, but when Im trying to run this query again he throws error
I also have index: (entityId, integrationId, type) entityId: string integrationId: string type: int
lightweightEdges enabled
UPD: works well without lightweight edges
Step to reproduce