views:

520

answers:

0

I having problems to generate a doctrine_rawsql with a custom select.

this is my rawsql

$distance = glength(linestringfromwkb(linestring(asbinary(GeomFromText('POINT( FLOAT('30') FLOAT('-3')),asbinary({l.point})))) as distance

$q->select($distance) ->from('place p INNER JOIN location l ON p.location_id = l.id') ->addComponent('p', 'Place p') ->addComponent('l', 'p.Location l')

if I do a $q->getSql() the distance dont appears in the generated sql.

Any ideas? I am doing something wrong?