@independent annotation
The @independent annotation is used
to prevent attributes without owners from being deleted automatically.
Usage
The @independent annotation enforces the independent constraint for an attribute type, allowing instances of the type to exist independently of their owner.
By default, attributes (instances of attribute types) depend on their owners:
-
Attributes cannot be inserted without a
hasclause. -
Attributes are automatically deleted when their owners are deleted.
In contrast, attributes of independent types can exist without owners.
Independent attribute types definition
#!test[schema, commit]
define
attribute language @independent, value string;
Inserting independent attributes
#!test[write]
insert
$english isa language "English";