tinkerpop3 icon indicating copy to clipboard operation
tinkerpop3 copied to clipboard

Update triples fails

Open ioleo opened this issue 1 year ago • 0 comments

I'm trying to update a triple by issuing

// val graph: BlazeGraphEmbedded
// val id: String = "subject id"
graph.update(
  s"""
     |
     |DELETE WHERE {
     |  <$id> ?p ?o
     |}
     |""".stripMargin
)
graph.commit()

graph.update(
  s"""
     |
     |INSERT DATA {
     |  <$id> somePredicate someObject ;
     |     anotherPredicate anotherObject .
     |}
     |""".stripMargin
)
graph.commit()

and I'm getting

java.lang.RuntimeException: org.openrdf.query.UpdateExecutionException: java.lang.IllegalStateException: Already assigned: old=TermId(10B), new=t10, this: _:t10

What is going on? Any way to workaround this issue?

ioleo avatar Jun 21 '23 10:06 ioleo