[TYPO3-mvc] RFC #11230: Allow multiple repositories per model class and add unit tests for the persistence manager

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Mon Jan 17 16:55:25 CET 2011


Re-Reminder. :>

Oliver Klee wrote:
> This is a SVN patch request.
>
> Type: Bugfix
>
> Bugtracker reference:
> http://forge.typo3.org/issues/11230
>
> Branches:
> trunk
>
>
> Problem:
>
> 1. Currently, it is not possible to have more than one repository class
> (e.g. a DB repository and a web service repository) for the same model
> class because PersistenceManager::persistAll checks for the existence of
> a name-based repository class.
>
> 2. The persistence manager has no unit tests for persistAll.
>
>
> Solution:
>
> 1. When checking for aggregate root objects for the reconstituted models
> from the session, the persistence manager also needs to take the
> repositories into account which it already knows about.
>
> 2. Add full unit tests for persistAll.
>
>
> How to test:
> Read and run the unit tests.
>
> And if you want to test manually, create a repository with a name that
> is different from the model name. ->findByUid a model, ->remove it and
> ->persistAll. The model then should be gone from the DB, but actually
> still is there.
>
>
>
> Note: You'll also need to apply the patch from #11229.
>
>
> All the best,
>
>
>
> Oli


More information about the TYPO3-project-typo3v4mvc mailing list