Open faubulous opened 1 year ago
uid(id1) * * .
is only supposed to work if the UID has a dgraph.type associated with it. See this for more details https://dgraph.io/docs/dql/dql-schema/#when-to-use-node-types
That explains it. However, it would be great to add or reference this in the documentation about Deleting Data as well: https://dgraph.io/tour/schema/8/
So will the wildcard then only delete the predicates that are defined for the type?
This issue has been stale for 60 days and will be closed automatically in 7 days. Comment to keep it open.
What version of Dgraph are you using?
v23.0.1
Tell us a little more about your go-environment?
I'm using the
dgraph/dgraph:latest
image from dockerhub.Have you tried reproducing the issue with the latest release?
Yes
What is the hardware spec (RAM, CPU, OS)?
Fedora 38 Host Intel Core i7 CPU 32GB RAM
What steps will reproduce the bug?
Run this mutation:
Set predicate type to
string
and enableindex
,upset
andhash
onid
in the schema.Run this query to see that
pred2
andpred3
exist:Run this upsert:
Run this query again to see that
pred2
andpred3
still exist:Run this upsert:
Run this query again to see that
pred2
andpred3
were deleted and the result is empty.Expected behavior and actual result.
When executing mutation from step 4 with a wildcard on the predicate, the predicates are not deleted. I would expect mutation from step 4 to have the same outcome as mutation from step 6 that uses explicit predicates as documented here.
Additional information
No response