Open teohhanhui opened 8 years ago
Another Information to note is that in this case a spatial index is being omitted when comparing the return value of these spatial functions.
👍
I'm willing to help work on this, as this is quite limiting for us (as @DaDeather mentioned, DQL at the moment only allows writing queries that completely omit any spatial index).
However, this seems quite some task for someone that never contributed to Doctrine, so I would like some guidance if possible :). As a start: does this have a possibility of being accepted if implemented as suggested in the description? and where do I add tests for this? (I don't see much tests in ParserTest
and I'm unsure where to put them)
Hello,
I have the same issue with SQL server "contains" fulltext search function that does not accept comparison. Here is the DQL:
SELECT count(s.id) FROM AppBundle\Entity\Scan s INNER JOIN s.documents documents WITH documents.num=1 WHERE contains(documents.name,'ppc') AND charindex(:value_62d6c8746d9f7,documents.name,0) >= 0
I cannot change contains(...) to contains(...) = true since SQL server does not allow it (raise error on =)
I'm stuck with this and cannot do a raw query
It is legitimate to allow Expr/Func as conditions since it is native sql query conditions
From jsor/doctrine-postgis#14
The following DQL:
gives
The workaround is to change it to:
It'd be great if the DQL parser would support boolean expressions.