Please sign in to comment.
feat(EntityManager): add performance repositories
Add cached repositories to the EntityManager for repetitive simple tasks such as quering the database for HTTP(s) requests. If you're planning on doing work with the unit of work (`wetland.getManager()` / `EntityManager.createScope()`) you must use the scope to get the repository, instead. Repositories fetched from the entity manager are a more performant way of querying the database, but they're never linked to a scope. If all you're planning on doing is fetching data or performing simple queries, this method is for you. The queries performed on a repository fetched from the EntityManager _do_ run in an internal scope, so they're safe to use in for example APIs. BREAKING CHANGE: The EntityRepository has a method called getEntityManager, which now conditionally returns the EntityManager or an instance of Scope. If you must have a Scope, call EntityRepository.getScope() instead.
- Loading branch information...
Showing with 88 additions and 27 deletions.