[TYPO3-mvc] How to get calculated data from a query into an object?
Martin Kutschker
masi-no at spam-typo3.org
Tue Feb 16 21:57:02 CET 2010
Franz Koch schrieb:
> 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.
You could create a transient (value) object NearbyStore that holds a reference to a store object and
the distance. Or you could simply create an array with entries that hold - yes - the store reference
and the distance.
Masi
More information about the TYPO3-project-typo3v4mvc
mailing list