Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indexing wont work with = 1 or = true #178

Open
jensstalder opened this issue Jul 7, 2017 · 1 comment
Open

Indexing wont work with = 1 or = true #178

jensstalder opened this issue Jul 7, 2017 · 1 comment

Comments

@jensstalder
Copy link

MySQL expects there to be no literal.

$qb->andWhere("ST_Intersects(node.polygon, mainnode.polygon) = true");

This works but the spacial index wont be used!

And this is not valid dql.

$qb->andWhere("ST_Intersects(node.polygon, mainnode.polygon)");

... Error: Expected Literal, ...

Do you have an idea if that can get fixed? or is there a workaround?

@yurtesen
Copy link

yurtesen commented Dec 2, 2017

No, there is no workaround to this. It is related to doctrine syntax checker. See this.

In addition, this issue is probably related to MySQL also because I just checked and PostgreSQL uses index. I actually switched to PostgreSQL due to MySQL's spatial support being so weak.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants