#1632: '&&' are wrongly translated into 'AND' into queries
------------------------------+---------------------------------------------
  Reporter:  tonio            |       Owner:  romanb               
      Type:  defect           |      Status:  new                  
  Priority:  major            |   Milestone:  1.0.4                
 Component:  Query/Hydration  |     Version:  1.0.3                
Resolution:                   |    Keywords:  postgis              
  Has_test:  0                |    Mystatus:  Pending Core Response
 Has_patch:  1                |  
------------------------------+---------------------------------------------
Changes (by jwage):

  * version:  => 1.0.3
  * milestone:  => 1.0.4

Old description:

> Hello,
>
> 'AND' and '&&' are 2 different operators in postgres/postgis. Doctrine
> shouldn't transform '&&' to 'AND' in where statement :
>

> inf_pat=# select id_site from t_sites where the_geom &&
> (Transform(GeometryFromText('POLYGON((...))', 4326 ), 27572)) limit 1;
>  id_site
> ---------
>       70
> (1 ligne)
>
> inf_pat=# select id_site from t_sites where the_geom AND
> (Transform(GeometryFromText('POLYGON((...))', 4326 ), 27572)) limit 1;
>
> ERROR:  argument of AND must be type boolean, not type geometry
>
> Thanks.

New description:

 Hello,

 'AND' and '&&' are 2 different operators in postgres/postgis. Doctrine
 shouldn't transform '&&' to 'AND' in where statement :


 inf_pat=# select id_site from t_sites where the_geom &&
 (Transform(GeometryFromText('POLYGON((...))', 4326 ), 27572)) limit 1;
  id_site
 ---------
       70
 (1 ligne)

 inf_pat=# select id_site from t_sites where the_geom AND
 (Transform(GeometryFromText('POLYGON((...))', 4326 ), 27572)) limit 1;

 ERROR:  argument of AND must be type boolean, not type geometry

 Thanks.

-- 
Ticket URL: <http://trac.doctrine-project.org/ticket/1632#comment:2>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"doctrine-svn" 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.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---

Reply via email to