Skip to content

__AddAttribute

Entity(Base) __AddAttribute(Entity(Base) container, Entity(Base) entityToAdd)

Builtins · internal core builtin · accessible from Bootstrap only

Adds an attribute to an entity.

The change is reported to the validation cache.

Parameters

  • Entity(Base) container — The entity to add the attribute to.
  • Entity(Base) entityToAdd — The attribute entity to add.

Returns

Entity(Base) — The container entity.

Errors

A runtime error if entityToAdd is already an attribute of container, or a dynamic attribute is added to a non-dynamic entity. A runtime type error if an argument is not an Entity.

See Also