Entity Manager

From Kernel version 3.2, it is possible to create an entity manager class in your persistence layer. It will be responsible for saving, updating, and deleting data. Using the class, you can separate data from persistence details (Propel).

It is important not to overuse the entity manager or repository for your logic. These two concepts should only be used for data persistence in entities. Combination of multiple calls and the entire logic should be done in the business layer by delegating calls to corresponding entities/repositories to keep the persistence layer separated from the business layer.

As an example on using an entity manager, see the Company module.

Related Spryks

You might use the following definitions to generate related code:

  • Add Zed Persistence Entity Manager
  • Add Zed Persistence Entity Manager Interface
  • Add Zed Persistence Entity Manager Interface Method
  • Add Zed Persistence Entity Manager Method

See the Spryk documentation for details.

 

See also:

 

Last review date: Mar. 21st, 2018