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
When using datastore, a deleted quad cannot be re-added. This happens if the code is deleting and adding quads in order to update. This error will be encountered if ignore_duplicate is set to true when using Datastore.
Steps to reproduce the issue:
q := quad.Make(quad.IRI("ID"), quad.IRI("schema:name"),quad.String("Original Name"),nil)
qs.AddQuad(q)
Delete the quad :
qs.RemoveQuad(q)
Add the quad again :
q := quad.Make(quad.IRI("ID"), quad.IRI("schema:name"),quad.String("Original Name"),nil)
qs.AddQuad(q)
Received results:
The quad will not be retrieved by an iterator.
Expected results:
The quad should be retrieved by an iterator.
Output of cayley version or commit hash:
v0.6.1
Environment details:
Gaedatastore
** Potentially misleading user research **
Line 186 of graph/gaedatastore/quadstore.go starts a nested if statement which will bypass setting keep = true. With keep = false, the node doesn't get an additional ID for quad.Added in the updateQuads() function. Line 250 of graph/gaedatastore/iterator.go will then skip the quad in the Next() function.
The text was updated successfully, but these errors were encountered:
Description
When using datastore, a deleted quad cannot be re-added. This happens if the code is deleting and adding quads in order to update. This error will be encountered if ignore_duplicate is set to true when using Datastore.
Steps to reproduce the issue:
q := quad.Make(quad.IRI("ID"), quad.IRI("schema:name"),quad.String("Original Name"),nil)
qs.AddQuad(q)
Delete the quad :
qs.RemoveQuad(q)
Add the quad again :
q := quad.Make(quad.IRI("ID"), quad.IRI("schema:name"),quad.String("Original Name"),nil)
qs.AddQuad(q)
Received results:
The quad will not be retrieved by an iterator.
Expected results:
The quad should be retrieved by an iterator.
Output of
cayley version
or commit hash:v0.6.1
Environment details:
Gaedatastore
** Potentially misleading user research **
Line 186 of graph/gaedatastore/quadstore.go starts a nested if statement which will bypass setting keep = true. With keep = false, the node doesn't get an additional ID for quad.Added in the updateQuads() function. Line 250 of graph/gaedatastore/iterator.go will then skip the quad in the Next() function.
The text was updated successfully, but these errors were encountered: