[TYPO3-mvc] Storing an object from a repository into session and get it back

Viktor Livakivskyi invisible.kinder at gmail.com
Mon Jun 22 14:50:44 CEST 2015


Hi, Jan 

> Assuming there are only "productId" and "quantity" given as a 
> "basketItem"s property, would it break DDD ideas if i would add a 
> getter getProduct() to the "basketItem" model and inside this getter i 
> fetch the "product" directly from the repository?

Well, I don't see any OOP or DDD violation here =)
You have a model, that gives back different model by getProduct() method. Retrieveing of this model is internal and doesn't matter how it was done: by Extbase or by yourself.


More information about the TYPO3-project-typo3v4mvc mailing list