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 @@ -2509,13 +2509,7 @@ private static List<EdgeEntity<Object>> getEdges(
2509
2509
if (edges != null ) {
2510
2510
for (int i = 0 , imax = edges .size (); i < imax ; i ++) {
2511
2511
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 );
2519
2513
list .add (ve );
2520
2514
}
2521
2515
}
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