tinkerpop - Gremlin Scala Neo4j: Search for node, add new node and edge between -
i unable find node via key , add new node , edge between them. movie nodes in graph, use: case class graphbuilder(movieid: int, personid: int) // val ident = key[string]("personid") val itemid = key[string]("movieid") // def applytograph(it: graphbuilder): unit = { val thisperson = graph + ("person", ident -> it.personid.asinstanceof[string]) val movies = graph.v.haslabel("movie").has(itemid, it.movieid) movies.headoption match { case some(v) => v --- "likedby" --> thisperson // tested println("yay" + v) case none => println("youre failure") } graph.tx.commit() } but each time run programmatically, correctly adds person graph via thisperson val, correctly finds movie vertex based on movieid, not create "likedby" edge. have tried without pattern matching on option not work either. what method best find node, add node, add edge between added , found? i'm bit con...