Skip to content

Commit

Permalink
refactor, use specific edge type for creation of raw element edges
Browse files Browse the repository at this point in the history
  • Loading branch information
tglman committed Oct 3, 2023
1 parent ebe9102 commit 4c0653d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

import static com.google.common.base.Preconditions.checkNotNull;

import com.orientechnologies.orient.core.db.ODatabaseSession;
import com.orientechnologies.orient.core.db.record.OIdentifiable;
import com.orientechnologies.orient.core.record.ODirection;
import com.orientechnologies.orient.core.record.OEdge;
import com.orientechnologies.orient.core.record.OElement;
import com.orientechnologies.orient.core.record.OVertex;
import com.orientechnologies.orient.core.record.impl.ODocument;
import com.orientechnologies.orient.core.record.impl.OEdgeDelegate;
import com.orientechnologies.orient.core.record.impl.OEdgeDocument;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
Expand Down Expand Up @@ -64,8 +65,7 @@ public static OIdentifiable getConnection(

protected static OEdge createRawElement(OGraph graph, String label) {
String className = graph.createEdgeClass(label);
OEdgeDelegate delegate = new OEdgeDelegate(new ODocument(className));
return delegate;
return new OEdgeDocument((ODatabaseSession) graph.getRawDatabase(), className);
}

@Override
Expand Down

0 comments on commit 4c0653d

Please sign in to comment.