klyn.data.EntityManager.remove
method

    public remove<T>(entity as T) as Void:

Description

Registers a managed entity for deletion.

A newly persisted but unflushed entity is simply removed from the unit of work; no SQL statement is generated.

Parameters

Parameter | Description
--- | ---
`<T>` | Entity type.
`entity` | Managed entity to remove.

Throws

- EntityLifecycleException when the instance is detached.

Example

    user = manager.find<User>(42)
    if user is not null:
    manager.remove(user)