Hi everybody, im new using symfony, im working in a GIS project, with
PostGIS, and i need to make a custom query like this:

SELECT b.gid, b.name FROM a, b WHERE a.the_geom && b.the_geom AND
a.gid=2

the problem is the operator &&, i add it in the begining of the
Criteria Class with other operator

        const INTERSECTA = "&&";

and after that did this:

$criteria = new Criteria();
$criteria->add(APeer::THE_GEOM, BPeer::THE_GEOM,
Criteria::INTERSECTA);
$this->sectoresList = BPeer::doSelect($criteria);

do not work, then i saw in the Criteria class the function addJoin
receive an operator and i tried:

$criteria = new Criteria();
$criteria->addJoin(APeer::THE_GEOM, BPeer::THE_GEOM,
Criteria::INTERSECTA);
$this->sectoresList = BPeer::doSelect($criteria);

and nothing, which would be the best way to make this query work with
propel? there is a way to send the bare sql query? is it a good
practice?

Thanks in advance

Francisco Calderón

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to