Closed samlaws closed 5 years ago
This is by design the expected behaviour, otherwise potential errors in the schema could result in silent schema overwrites.
Instead you should first undefine your entity type:
undefine owned-object sub entity;
and then update the relation/entity definition:
define
ownership sub relation,
relates owner,
relates owned-object;
object sub entity,
has name,
plays owned-object;
Hope that helps.
OK thanks for the response that makes a lot of sense, I'll go ahead and close the issue now.
Cheers
Description
When changing the name of a role to one that has previously belonged to an entity results in a grakn client exception.
Environment
Reproducible Steps
Steps to create the smallest reproducible scenario:
person sub entity, has name, plays owner;
owned-object sub entity, has name, plays owned-object-test;
ownership sub relation, relates owner, relates owned-object-test;
name sub attribute, datatype string;
define
person sub entity, has name, plays owner;
object sub entity, has name, plays owned-object;
ownership sub relation, relates owner, relates owned-object;
name sub attribute, datatype string;
Failed to load file: ownership_schema.gql Cause: grakn.client.exception.GraknClientException UNKNOWN: The concept [Base Type [ENTITY_TYPE] - Id [V4288] - Label [owned-object] ] is not of type [interface grakn.core.concept.type.Role]. Please check server logs for the stack trace.