class Athena::ORM::Bundle::Registry
inherits Reference
#
Provides the AORM::EntityManager of the current unit of work, such as a request.
The entity manager is created the first time it's needed, on a connection checked out from the connection pool of the configured url.
#close closes it and returns its connection to the pool, which the Athena Framework does once each request is done.
#reset only clears it, which the framework does between the requests made within a test, see ADI::Spec::ContainerTestCase.
Included modules
Athena::Contracts::Service::Closeable
Athena::Contracts::Service::Resettable
Constructors#
Methods#
#close : Nil#
Closes the entity manager, if one was created, rolling back any transaction left open and returning its connection to the pool.
#manager : AORM::EntityManager#
Returns the entity manager of the current unit of work, creating it if needed.
#reset : Nil#
Clears the entity manager, if one was created, keeping it open on its connection.
Transactions left open are left to whoever began them.