File tree 2 files changed +9
-7
lines changed
main/java/com/arangodb/entity
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(
2513
2513
if (edges != null ) {
2514
2514
for (int i = 0 , imax = edges .size (); i < imax ; i ++) {
2515
2515
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 );
2523
2517
list .add (ve );
2524
2518
}
2525
2519
}
Original file line number Diff line number Diff line change 34
34
import com .arangodb .entity .BaseDocument ;
35
35
import com .arangodb .entity .BaseEntity ;
36
36
import com .arangodb .entity .EdgeDefinitionEntity ;
37
+ import com .arangodb .entity .EdgeEntity ;
37
38
import com .arangodb .entity .PathEntity ;
38
39
import com .arangodb .entity .TraversalEntity ;
39
40
import com .arangodb .entity .marker .VertexEntity ;
@@ -123,6 +124,7 @@ public void test_getTraversal() throws ArangoException {
123
124
124
125
assertThat (paths .get (3 ).getEdges ().size (), is (2 ));
125
126
assertThat (paths .get (3 ).getVertices ().size (), is (3 ));
127
+
126
128
}
127
129
128
130
@ Test
@@ -158,6 +160,12 @@ public void test_getTraversalWithBaseDocument() throws ArangoException {
158
160
159
161
assertThat (paths .get (3 ).getEdges ().size (), is (2 ));
160
162
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
+
161
169
}
162
170
163
171
private VertexEntity <Person > createPerson (final String name ) throws ArangoException {
You can’t perform that action at this time.
0 commit comments