How to undefine one role in a relation in Grakn

70 Views Asked by At

I have a relation in Grakn with several roles. I want to undefine one of those roles. Let's say I have this relation:

define
drive sub relation, 
relates driven, 
relates driving; 

If I run this command:

undefine drive sub relation, relates driven;

I get the error below:

Error: UNKNOWN: Type [drive] cannot be deleted as it still has incoming edges. Please check server logs for the stack trace.
All uncommitted data is cleared

How can I undefine one of these two roles?

1

There are 1 best solutions below

0
Alex Walker On

In Grakn 1.8, you need to separately undefine the roles in order to undefine a relation:

undefine
drive relates driven;
drive relates driving;
drive sub relation;

If anything plays driven or driving, you will need to undefine that too, e.g:

undefine person plays driven;