Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.2.4
-
Fix Version/s: 1.2.2
-
Component/s: Attributes
-
Labels:None
-
Environment:Symfony 1.4.11 and Doctrine 1.2.4. Ubuntu 11.04 Apache2 with mod php5. php5 version PHP 5.3.5-1ubuntu7.2 with Suhosin-Patch
Description
Mi Doctrine_Query with this Geometric Query fails with orderBy , but with where works.
$distance = "glength(linestringfromwkb(linestring(GeomFromText('POINT( ".$object->getLatitude()." ".$object->getLongitude() .")'),l.point))) "
This works:
SomeObjectTable::getInstance()>createQuery()>where($distance.' < ?',0.05 )
But this one fails at version 1.2.4, with older version was working.
SomeObjectTable::getInstance()>createQuery()>where($distance.' < ?',0.05 )->orderBy($distance)
Well the problem is at line 74 of OrderBy.php :
$componentAlias = implode('.', $e);
the rendered query in the distance has some ".", for example:
POINT( -34.470829 -58.5286102)
then the after line 74 in OrderBy tries to search por '58' class.
I manually added to DataDict in Mysql.php the POINT datatype (this fix solve me the problem in older versions of Doctrine).