[TYPO3-mvc] How to load a list of value objects?

Martin Kutschker masi-no at spam-typo3.org
Mon Apr 18 14:37:48 CEST 2011


Am 18.04.2011 11:51, schrieb Franz Koch:
> 
> I know that there's a statement that any model having a repository has to be a aggregate root, but I
> can't second this.

And I don't think it's true. IMHO there are (only?) two rules.

Any model within a repository may be accessed only via the repository.
Any model that is not a an aggregate root may be accessed only via models that are aggregate roots.

So I think if you have DB-based value objects it is sensible to add a method to you repository to
list all values current available. So as long as the query factory code of yours is within the
repository I see no fault in it (besides that it is cumbersome).

Masi


More information about the TYPO3-project-typo3v4mvc mailing list