You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RemoteVertex.newEdge does not support Map properties, while GraphEntity.newEdge does #1569
Running on Linux 4.18.0-477.21.1.el8_8.x86_64 - OpenJDK 64-Bit Server VM 11.0.22 (Temurin-11.0.22+7)
Expected behavior
`Expected all implementations of Vertex.newEdge(..., final Object... properties) to support both
Map
or
array or sequence of arguments
for properties. `
Actual behavior
Success case (embedded):
GraphEngine.newEdge(...) employs its setProperties method which handles properties provided to it as a Map OR array of arguments (Properties must be an even number as pairs of name, value).
Failure case (remote):
RemoteVertex.newEdge(...) expects only an array of arguments. Properties provided as a Map results in an Exception at line 143. class java.util.HashMap cannot be cast to class java.lang.String (java.util.HashMap and java.lang.String)
Steps to reproduce
db is a RemoteDatabase
db.transaction( () -> {
MutableVertexelon = db.newVertex("User", "name", "Elon", "lastName", "Musk").save();
MutableVertexsteve = db.newVertex("User", "name", "Steve", "lastName", "Jobs").save();
Map<String, Object> properties = newHashMap();
properties.put("since", 2010);
properties.put("Map", "would like to be supported in RemoteVertex, just like it's buddy GraphEngine ;-)");
elon.newEdge("IsFriendOf", steve, true, properties);
});
Activity
lvca commentedon Apr 27, 2024
Confirmed, the support for passing a map is totally missing in the remote vertex. Fixing it.
fix: supported passing of map to remote edge creation
lvca commentedon Apr 27, 2024
Implemented.
fix: supported passing of map to remote edge creation
chore(deps): bump actions/setup-node from 6.4.0 to 7.0.0 [skip ci]