mpollmeier / gremlin-scala

[unmaintained] Scala wrapper for Apache TinkerPop 3 Graph DSL
Apache License 2.0
482 stars 76 forks source link

Create vertex with Custom vertex id #278

Open mkeshav opened 5 years ago

mkeshav commented 5 years ago

Hi There, As per AWS Neptune documentation, if you pass "id" attribute, that will be the vertex id. If you do not, then neptune will generate a uuid.

I am trying to do local development with gremlin server and trying to create a vertex with uuid as it is id and cannot find any example of that.

Help would be appreciated

bowofolaf commented 5 years ago

I have the same problem. Unfortunately I cant use the id annotation on a case class due to neptune limitations, and it appears the gremlin-scala DSL doesn't allow you do

val object = MyCaseClass("someAttribute")
graph + ("customId", object)