i am using https://github.com/djlambert/doctrine2-spatial and i have an error when trying a query with the "contains" function
firstly, if i put this :
dql:
numeric_functions:
Contains: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Contains
under orm like in doc (https://github.com/djlambert/doctrine2-spatial/blob/master/INSTALL.md), i have this error :
[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
Unrecognized options "dql" under "doctrine.orm"
but if i put it under doctrine.orm.entity_managers.default there is no error but i still have an error when running the query, here is my code :
$sql = 'SELECT DemoTadBundle:DeliveryZone dz WHERE Contains(dz.area, :point)'; //dz.area is of type polygon
$converter = new SpatialConverter();
$q = $this->_em->createQuery($sql)->setParameter('point', $converter->convertToDatabaseValue($address->getPoint())); //$address->getPoint returns an CrEOF\Spatial\PHP\Types\Geometry\Point object
return $q->getOneOrNullResult();
and here is the error :
[Semantical Error] line 0, col 41 near 'Contains(dz.area,': Error: Class 'Contains' is not defined.
can someone help me to resolve this problem ?
my symfony version is 2.5
thank you.