Code

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#10839 closed (fixed)

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

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

Description (last modified by Alex)

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 5 years ago.
Initial stab at this patch.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 5 years ago by Alex

  • Description modified (diff)
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 5 years ago by jbronn

  • Keywords oracle gis added
  • Summary changed from Pickling queryset.query doesn't work for gis models to Pickling queryset.query doesn't work for gis models on Oracle

Changed 5 years ago by jbronn

Initial stab at this patch.

comment:3 Changed 5 years ago by jbronn

  • Needs tests set
  • Owner changed from nobody to jbronn

comment:4 Changed 5 years ago by jbronn

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:5 Changed 5 years ago by jbronn

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

Backport of r10615 from trunk.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.