我对 Neptune 使用Gremlin-scala 3.4.1.5,我无法使用带有 List 或 Set 的案例类添加顶点,就像这样。添加顶点似乎在不存在时起作用
//connection
Cluster.build()
.addContactPoint(endpoint)
.serializer(new GraphSONMessageSerializerV3d0())
.port(port)
.create()
val g = EmptyGraph.instance.asScala().configure(_.withRemote(DriverRemoteConnection.using(cluster)))
// adding vertex
case class Person(name: String, friends: Seq[String])
case class Person(name: String, friends: Set[String]) // also does not work
g + Person
堆栈跟踪
org.apache.tinkerpop.gremlin.driver.exception.ResponseException: {"requestId":-087f-4868-b4b7-","code":"UnsupportedOperationException","detailedMessage":"Unsupported property value type: java.util.LinkedHashMap"}
java.util.concurrent.CompletionException: org.apache.tinkerpop.gremlin.driver.exception.ResponseException: {"requestId":"-087f-4868-b4b7-","code":"UnsupportedOperationException","detailedMessage":"Unsupported property value type: java.util.LinkedHashMap"}
at java.util.concurrent.CompletableFuture.reportJoin(CompletableFuture.java:375)
at java.util.concurrent.CompletableFuture.join(CompletableFuture.java:1934)
at org.apache.tinkerpop.gremlin.driver.ResultSet.one(ResultSet.java:119)
at org.apache.tinkerpop.gremlin.driver.ResultSet$1.hasNext(ResultSet.java:171)
at org.apache.tinkerpop.gremlin.driver.ResultSet$1.next(ResultSet.java:178)
at org.apache.tinkerpop.gremlin.driver.ResultSet$1.next(ResultSet.java:165)
at org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteTraversal$TraverserIterator.next(DriverRemoteTraversal.java:140)
at org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteTraversal$TraverserIterator.next(DriverRemoteTraversal.java:125)
at org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteTraversal.nextTraverser(DriverRemoteTraversal.java:106)