Entity Manager

To create an entity manager instance and use the methods bellow:

let manager = wetland.getManager();
`

.createScope()

Creates a new entity manager scope.

manager.createScope();

.getConfig()

Gets the config using .getConfig() from wetland.

manager.getConfig();

.getEntities()

Returns all registered entities as an object.

manager.getEntities();

.getEntity()

Get the reference to an entity constructor by its name.

manager.getEntity('entityName');

.getMapping()

Get the mapping for provided entity. Can be an instance, constructor or the name of the entity.

manager.getMapping(entity);

.registerEntities()

Register multiple entities.

manager.registerEntities([entity1, entity2]);

.registerEntity()

Register a single entity.

manager.registerEntity(entity);

.resolveEntityReference()

Resolve provided value to an entity reference. The argument can be a name, the constructor or the entity itself.

manager.resolveEntityReference(entity);

results matching ""

    No results matching ""