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 doesn't appears in the generated sql.
Any ideas? I am doing something wrong?
The problem seems to be solved now using Doctrine_Expression
$user = new User();
$user->username = 'jwage';
$user->updated_at = new Doctrine_Expression('NOW()');
$user->save();