Skip to content

__CreateEntity

Entity(Base) __CreateEntity(String? id, Entity(Base)? meta)

Builtins · internal core builtin · accessible from Bootstrap only

Creates a new entity.

When id is null, an id of the form <meta name>.<UUID> is generated. The new entity is reported to the validation cache.

Parameters

  • String? id — The id of the new entity, or null to generate one.
  • Entity(Base)? meta — The meta entity of the new entity.

Returns

Entity(Base) — The new entity.

Errors

A runtime error if id is in the Bootstrap package. A runtime type error if id is not a String, or meta is not an Entity.

See Also