Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#10839 closed (fixed)

Pickling queryset.query doesn't work for gis models on Oracle

Reported by: Jani Tiainen Owned by: jbronn
Component: GIS Version: dev
Severity: Keywords: oracle gis
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Alex Gaynor)

If I pickle queryset.query which is GIS model I get following results (using Oracle as database):
qs = MyModel.objects.filter(id=12345)

before pickling:

>>> qs.query 
<django.contrib.gis.db.models.sql.query.GeoQuery object at 0x0199FB90>
>>> qry_str = pickle.dumps(qs.query)
>>> qry = pickle.loads(qry_str)
>>> qry
<django.db.backends.oracle.query.OracleQuery object at 0x019C3F70>

Somehow query object has changed. It works as expected on non GIS models.

Attachments (1)

geoquery_pickle_orcl.diff (1.4 KB ) - added by jbronn 15 years ago.
Initial stab at this patch.

Download all attachments as: .zip

Change History (6)

comment:1 by Alex Gaynor, 15 years ago

Description: modified (diff)

comment:2 by jbronn, 15 years ago

Keywords: oracle gis added
Summary: Pickling queryset.query doesn't work for gis modelsPickling queryset.query doesn't work for gis models on Oracle

by jbronn, 15 years ago

Attachment: geoquery_pickle_orcl.diff added

Initial stab at this patch.

comment:3 by jbronn, 15 years ago

Needs tests: set
Owner: changed from nobody to jbronn

comment:4 by jbronn, 15 years ago

Resolution: fixed
Status: newclosed

(In [10615]) Fixed #10839 -- GeoQuery now unpickles properly on Oracle.

comment:5 by jbronn, 15 years ago

(In [10616]) [1.0.X] Fixed #10839 -- GeoQuery now unpickles properly on Oracle.

Backport of r10615 from trunk.

Note: See TracTickets for help on using tickets.
Back to Top