Skip to content

Commit 7ec1f31

Browse files
committed
fix: make sure to handle correctly lightweigh edges in save
1 parent 092380c commit 7ec1f31

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

core/src/main/java/com/orientechnologies/orient/core/db/document/ODatabaseDocumentEmbedded.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
import com.orientechnologies.orient.core.query.live.OLiveQueryHookV2;
9090
import com.orientechnologies.orient.core.query.live.OLiveQueryListenerV2;
9191
import com.orientechnologies.orient.core.query.live.OLiveQueryMonitorEmbedded;
92+
import com.orientechnologies.orient.core.record.OEdge;
9293
import com.orientechnologies.orient.core.record.OElement;
9394
import com.orientechnologies.orient.core.record.ORecord;
9495
import com.orientechnologies.orient.core.record.ORecordInternal;
@@ -1044,7 +1045,11 @@ public ODatabaseDocumentAbstract delete(ORecord record) {
10441045
if (((OElement) record).isVertex()) {
10451046
OVertexDocument.deleteLinks(((OElement) record).asVertex().get());
10461047
} else if (((OElement) record).isEdge()) {
1047-
OEdgeDocument.deleteLinks(((OElement) record).asEdge().get());
1048+
OEdge edge = ((OElement) record).asEdge().get();
1049+
OEdgeDocument.deleteLinks(edge);
1050+
if (edge.isLightweight()) {
1051+
return this;
1052+
}
10481053
}
10491054
}
10501055

0 commit comments

Comments
 (0)