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 @@ -2509,13 +2509,7 @@ private static List<EdgeEntity<Object>> getEdges(
25092509 if (edges != null ) {
25102510 for (int i = 0 , imax = edges .size (); i < imax ; i ++) {
25112511 final JsonObject edge = edges .get (i ).getAsJsonObject ();
2512- final EdgeEntity <Object > ve = deserializeBaseParameter (edge , new EdgeEntity <Object >());
2513- deserializeDocumentParameter (edge , ve );
2514- if (edgeClazz != null ) {
2515- ve .setEntity (context .deserialize (edge , edgeClazz ));
2516- } else {
2517- ve .setEntity (context .deserialize (edge , Object .class ));
2518- }
2512+ final EdgeEntity <Object > ve = context .deserialize (edge , EdgeEntity .class );
25192513 list .add (ve );
25202514 }
25212515 }
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