Nesting spatial filters with the __in filter will be broken until I buy you a beer.

10 views
Skip to first unread message

jpk

unread,
Dec 5, 2011, 10:33:21 AM12/5/11
to django...@googlegroups.com
Hi all,

I've recently been using the __in filter, and it's pretty nifty.
However, it seems that nesting any of geodjango's spatial filters with
the __in filter is busted. This ticket:
https://code.djangoproject.com/ticket/17314 explains the behavior in
detail, but the précis is: "things =
Thing.objects.filter(point_field__contained=Polygon(...))" followed by
"other_things = OtherThing.objects.filter(thing__in=things)" results
in the sql compiler blowing up when the query for other_things is
supposed run.

This is a major pain in two apps I'm working on, and I'll sponsor
patches with things including but not limited to:
* Free beer
* Homemade cupcakes
* Hugs

Or, if you have the inhuman inclination to refuse the aforementioned
bribery, I can probably fix the issue with some direction (which would
still be met with considerable gratitude).

Thanks,
jpk

--


John P. Kiffmeyer
Email/XMPP: jo...@thekiffmeyer.org

Reply all
Reply to author
Forward
0 new messages