Skip to content

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

Description

@erwinfeser

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions