Hi zusammen
Ich stehe gerade vor einem Problem wo ich nicht weiter komme. Ich habe folgenden Datenbank-Query als Beispiel:
SELECT
*, (
ACOS(
SIN(
RADIANS(
LEFT (
googlemapslatlng,
locate(',', googlemapslatlng) - 1
)
)
) * SIN(RADIANS(46.866431)) + COS(
RADIANS(
LEFT (
googlemapslatlng,
locate(',', googlemapslatlng) - 1
)
)
) * COS(RADIANS(46.866431)) * COS(
RADIANS(
substring(
googlemapslatlng,
locate(',', googlemapslatlng) + 1
)
) - RADIANS(9.862788898)
)
) * 6371
) AS radius
FROM
tx_object_domain_model_location AS location
INNER JOIN tx_object_domain_model_standtime ON tx_object_domain_model_standtime.location = location.uid
INNER JOIN tx_object_standtime_weekday_mm mm ON tx_object_domain_model_standtime.uid = mm.uid_local
WHERE
mm.uid_foreign != 2
GROUP BY
location.uid
HAVING
radius <= 15
"radius" ist hierbei ein virtuelles Feld, das physisch nicht als Spalte in der Datenbank vorkommt. Wie kriege ich dieses Feld jetzt ausgegeben mit dem View?
Meine erste Idee war, es einfach mal im Model zu mappen:
/**
* radius
*
* @var string
*/
protected $radius = '';
/**
* Returns the radius
*
* @return string $radius
*/
public function getRadius() {
return $this->radius;
}
/**
* Sets the radius
*
* @param string $radius
* @return void
*/
public function setRadius($radius) {
$this->radius = $radius;
}
Im Objekt bekomme ich dann aber nur
radius => '' (0 chars)
TYPO3 Version ist 6.2.5, falls das etwas zur Sache tut.. 😉
Kann mir hier jemand weiterhelfen? Vielen Dank...