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))) "
>createQuery()>where($distance.' < ?',0.05 )
But this one fails at version 1.2.4, with older version was working.
>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).