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

It is not possible to filter by FK or M2M fields #19

Open
erwinfeser opened this issue Jan 12, 2021 · 0 comments
Open

It is not possible to filter by FK or M2M fields #19

erwinfeser opened this issue Jan 12, 2021 · 0 comments

Comments

@erwinfeser
Copy link

erwinfeser commented Jan 12, 2021

Problem description

It seems to that it is not possible to filter by relations (FK or M2M). I suspect that the SQL statement is not being built well for these cases. In this case I am using a model called Station with a M2M field called aliases (which I am trying to use to filter by).

Error: missing FROM-clause entry for table when running intersect

missing FROM-clause entry for table "station_aliases"
LINE 6: ...26044311186, 0 -66.51326044311186))'), 4326)) AND "station_a...

It happens in File "/lib/python3.8/site-packages/rest_framework_mvt/managers.py", line 48, in intersect cursor.execute(query, [str(bbox), str(bbox)] + parameters + [limit, offset])

Version Number

  • djangorestframework-mvt 0.2.5
  • Python 3.8
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

1 participant