File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
main/java/com/arangodb/entity Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -2513,13 +2513,7 @@ private static List<EdgeEntity<Object>> getEdges(
25132513 if (edges != null ) {
25142514 for (int i = 0 , imax = edges .size (); i < imax ; i ++) {
25152515 final JsonObject edge = edges .get (i ).getAsJsonObject ();
2516- final EdgeEntity <Object > ve = deserializeBaseParameter (edge , new EdgeEntity <Object >());
2517- deserializeDocumentParameter (edge , ve );
2518- if (edgeClazz != null ) {
2519- ve .setEntity (context .deserialize (edge , edgeClazz ));
2520- } else {
2521- ve .setEntity (context .deserialize (edge , Object .class ));
2522- }
2516+ final EdgeEntity <Object > ve = context .deserialize (edge , EdgeEntity .class );
25232517 list .add (ve );
25242518 }
25252519 }
Original file line number Diff line number Diff line change 3434import com .arangodb .entity .BaseDocument ;
3535import com .arangodb .entity .BaseEntity ;
3636import com .arangodb .entity .EdgeDefinitionEntity ;
37+ import com .arangodb .entity .EdgeEntity ;
3738import com .arangodb .entity .PathEntity ;
3839import com .arangodb .entity .TraversalEntity ;
3940import com .arangodb .entity .marker .VertexEntity ;
@@ -123,6 +124,7 @@ public void test_getTraversal() throws ArangoException {
123124
124125 assertThat (paths .get (3 ).getEdges ().size (), is (2 ));
125126 assertThat (paths .get (3 ).getVertices ().size (), is (3 ));
127+
126128 }
127129
128130 @ Test
@@ -158,6 +160,12 @@ public void test_getTraversalWithBaseDocument() throws ArangoException {
158160
159161 assertThat (paths .get (3 ).getEdges ().size (), is (2 ));
160162 assertThat (paths .get (3 ).getVertices ().size (), is (3 ));
163+
164+ assertThat (paths .get (1 ).getEdges ().size (), is (1 ));
165+ EdgeEntity <BaseDocument > edgeEntity = traversal .getPaths ().get (1 ).getEdges ().get (0 );
166+ assertThat (edgeEntity .getFromVertexHandle (), is ("person/Alice" ));
167+ assertThat (edgeEntity .getToVertexHandle (), is ("person/Bob" ));
168+
161169 }
162170
163171 private VertexEntity <Person > createPerson (final String name ) throws ArangoException {
You can’t perform that action at this time.
0 commit comments