[TYPO3-mvc] DataMapper: relations with custom constraint?

Franz Koch typo3.RemoveForMessage at elements-net.de
Tue Jan 26 19:43:09 CET 2010


Hi,

>>
>> A few hints or pointers about how this could or should be done would be very much appreciated. Maybe there even exists a simple solution I didn't think of yet, who knows?
>
> I you have a price for each customer it doesn't seem to me a good idea to have a prices property
> attached to a product.
>
> The logic to get the price for a customer should be moved to somewhere else. Maybe a "price service"
> or something like that.

That's what I do (or am going to do in a few days) in my project having 
the exact same situation, only that my prices depend on several 
constrains, not just fe_users.

---------------

My first thought when I read the original post from Lienhart was to have 
the DataMapper simply make use of the according repository (if 
available) where you could take care of all the logic.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list