Delete edge which object's valueType is uid

When I run dgraph server with the binaries version v0.9.4, i run the java client such as

Mutation.Builder b = Mutation.newBuilder(mu);
                            .setObjectId(valueUid)            // valueUid is the Object's uid

the server throw an exeption such as

Exception in thread "main" io.grpc.StatusRuntimeException: UNKNOWN: Please use * with delete operation for non-list type
	at io.grpc.stub.ClientCalls.toStatusRuntimeException(
	at io.grpc.stub.ClientCalls.getUnchecked(
	at io.grpc.stub.ClientCalls.blockingUnaryCall(
	at io.dgraph.DgraphGrpc$DgraphBlockingStub.mutate(
	at io.dgraph.DgraphClient$Transaction.mutate(

but when i run dgraph with the source code , i success delete the edge use the same java code

can anyone tell me why. (is the binaries version is not use the newest source code?)

Hey @yunzhongshu

What’s the schema type for the predicate you are trying to delete? For predicates of scalar type(int/float/geo etc.) we don’t allow S P O deletion. You have to do a S P * deletion. You could use the delete edges function to achieve this.

The schema type is uid, not the scalar type, so I use the “setObjectId” not “setObjectValue”

I see, also are you sure that valueUid has a non-zero value? This error would also be thrown if valueUid is 0.

If you are still facing the issue could you create an issue on Github with some steps to reproduce please?

ok, thank for your reply

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.