Repository.save

Saves the entity in the repository. This should be called to add a new entity or to update a modified entity.

After saving it will return a new entity. This new instance should be used in place of the original one as certain properties (such as the id) could have been changed.

interface Repository(Entity)
Entity
save
(
Entity entity
)

Parameters

entity Entity

the entity to save.

Return Value

Type: Entity

A saved instance of the entity.

Meta