[TYPO3-mvc] domain objects and mysql-aggregation attributes

Stephan Petzl spetzl at gmx.at
Mon Feb 21 10:06:58 CET 2011


Hello List!

I'm not sure how to handle this:

I have a game model which has a score property.
Now I want to show the highscore of the day, and therefor i want to use 
mysql's MAX function:

SELECT g.*, MAX(g.score) as maxScore
FROM tx_ajadodpm_domain_model_game g

But when I try to access {game.maxScore} in the view, I don't get 
anything back. I have also tried to make "maxScore" a property of the 
model "game", but AFAIK this is not right in therms of DDD. Apart from 
this, it doesn't work anyway, still getting nothing back :)

How would you handle this?

-- 
Best Regards
Stephan Petzl
http://www.ajado.com


More information about the TYPO3-project-typo3v4mvc mailing list