[TYPO3-mvc] How to get calculated data from a query into an object?
Franz Koch
typo3.RemoveForMessage at elements-net.de
Tue Feb 16 18:27:34 CET 2010
Hi,
I'm currently struggling with a query returning stores from the
repository, that are near by the visitors location. The stores get found
nicely by my custom statement, but how can I assign a row value
"distance" that got calculated by MySQL to a property to my store
objects? The distance is not part of the general domain and should not
get persisted etc., but it is required for this special purpose.
I could of course add a getter method to my store and call a service
calculating the distance again, but that's unnecessary overhead as
everything is already in place for use.
How to deal with such special cases? Is there any concept in
FLOW3/extbase yet?
For now I hacked extbase to fill any available property of a object with
a DBvalue as long as it has a type/var annotation - so it's working now
for me ATM, but it's just a hack and I wonder how the official way would be.
--
kind regards,
Franz Koch
More information about the TYPO3-project-typo3v4mvc
mailing list