#7813: Problem Pickling Querysets
----------------------------------------------------+-----------------------
Reporter: Ed Menendez <[EMAIL PROTECTED]> | Owner:
mtredinnick
Status: new | Milestone:
Component: Database wrapper | Version: SVN
Resolution: | Keywords: queryset
pickle select_related
Stage: Unreviewed | Has_patch: 1
Needs_docs: 0 | Needs_tests: 1
Needs_better_patch: 0 |
----------------------------------------------------+-----------------------
Changes (by jbronn):
* needs_better_patch: => 0
* component: Uncategorized => Database wrapper
* needs_tests: => 1
* owner: nobody => mtredinnick
* keywords: queryset pickle => queryset pickle select_related
* needs_docs: => 0
* has_patch: 0 => 1
Comment:
I encountered this bug this past week and forgot to file a ticket. The
problem is that when `select_related` is used, one of the internal `Query`
data structures still contains references to `Fields` (some of which can't
be pickled because of curried functions). This patch blanks out the
`related_select_fields` structure prior to pickling, which should be OK
because it's repopulated every time `pre_sql_setup` is called in `as_sql`.
Malcolm will tell us if I'm wrong :)
--
Ticket URL: <http://code.djangoproject.com/ticket/7813#comment:1>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---