[TYPO3-dev] Remove records from extbase query result

Dirk Wenzel wenzel at webfox03.de
Tue Jan 14 20:02:26 CET 2014


Hi Philip,
thank you.
I'm curious to see your implementation.
For me your proposal seems to be a future solution but not really 
feasible at the moment.

There seems to be a @transient annotation in Flow3 already. At least I 
found this [1] class at github.
AFAIK it is not yet ported back to Extbase. I couldn't even find a 
documentation about annotation in Extbase.

Kind regards
Dirk

Am 14.01.14 08:39, schrieb Philipp:
> You can make a direct sql query with a haversine in it and then use the
> mapper to do the mapping like it would be done in a regular repository
> method. I am looking forward to implement that mechanism myself, its a
> little work to do but not that hard i think. Additionally you could then
> use the calculated and selected distance and set it in a transient
> property of your object.
>
> Then -of course- you should also write your own paginate viewhelper
> which can handle that direct sql and adds offset/limit itself.
>
> A transient distance property natively supported by Flow/Extbase would
> be very nice
>
> something like
>
> /**
> * @var float
> * @transient
> */
> protected $distance
>
> #####
>
> $query->matching($query->lowerThanOrEqual('distance',$query->calculate('haversine',$coords1,$coords2)))->setOrdering('distance',ASC)->execute();
>
>
> $coords would be an interface having
> getLatitude()
> getLongitude()
>
> #####
>
> And calculate could easily be extended like Validation or something....
> so you could feed your results transient properties from your query result.
>
> Could be managed quiet easily and would add up much power to Flow/Extbase.



More information about the TYPO3-dev mailing list