Skip to content

Commit

Permalink
fix: make sure to handle correctly lightweigh edges in save
Browse files Browse the repository at this point in the history
  • Loading branch information
tglman committed Aug 14, 2024
1 parent 092380c commit 7ec1f31
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
import com.orientechnologies.orient.core.query.live.OLiveQueryHookV2;
import com.orientechnologies.orient.core.query.live.OLiveQueryListenerV2;
import com.orientechnologies.orient.core.query.live.OLiveQueryMonitorEmbedded;
import com.orientechnologies.orient.core.record.OEdge;
import com.orientechnologies.orient.core.record.OElement;
import com.orientechnologies.orient.core.record.ORecord;
import com.orientechnologies.orient.core.record.ORecordInternal;
Expand Down Expand Up @@ -1044,7 +1045,11 @@ public ODatabaseDocumentAbstract delete(ORecord record) {
if (((OElement) record).isVertex()) {
OVertexDocument.deleteLinks(((OElement) record).asVertex().get());
} else if (((OElement) record).isEdge()) {
OEdgeDocument.deleteLinks(((OElement) record).asEdge().get());
OEdge edge = ((OElement) record).asEdge().get();
OEdgeDocument.deleteLinks(edge);
if (edge.isLightweight()) {
return this;
}
}
}

Expand Down

0 comments on commit 7ec1f31

Please sign in to comment.