[TYPO3-mvc] Mapping various Objects to a Domain Model

Frank Krüger fkrueger-ml at mp-group.net
Sat Jun 16 09:48:44 CEST 2012


Hi,

the first argument for the DataMapper is the model name to which the DataArray should be mapped, either it fits (and all validator rules are satisfied) or not, so IMHO it's not the mappers task to decide which model to use, it is yours.

Depending on the converted JSON-Data you (your controller or your repository) should decide which model to use.

Cheers,
Frank

-----Ursprüngliche Nachricht-----
Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org [mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von Thomas "Thasmo" Deinhamer
Gesendet: Freitag, 15. Juni 2012 18:41
An: typo3-project-typo3v4mvc at lists.typo3.org
Betreff: Re: [TYPO3-mvc] Mapping various Objects to a Domain Model

Hello,

thanks for your idea about the data mapper.

But how would the datamapper know which property of the JSON object belongs to which domain object property?

Does the datamapper also map domain objects to properties?

I will have a look to get a better
understanding of the datamapper.

Thanks,
Thomas




More information about the TYPO3-project-typo3v4mvc mailing list