#13119: Can't pickle queryset
---------------------------------------------------+------------------------
          Reporter:  anentropic                    |         Owner:  nobody     
    
            Status:  reopened                      |     Milestone:             
    
         Component:  Database layer (models, ORM)  |       Version:  1.2-beta   
    
        Resolution:                                |      Keywords:  querySet 
pickle
             Stage:  Unreviewed                    |     Has_patch:  0          
    
        Needs_docs:  0                             |   Needs_tests:  0          
    
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Changes (by ashchristopher):

  * status:  closed => reopened
  * resolution:  worksforme =>

Comment:

 This isn't really a solution to the problem, or if it is a solution to the
 problem then the documentation on QuerySets is wrong. Either way, I don't
 believe this is solved.


 According to documentation, this it valid:

 the_region = TripRegion.objects.all()[0]
 guides = DestinationGuide.objects.active().filter(region=the_region)

 And sure, it is a valid way to perform a QuerySet lookup, however in order
 to make use of say caching which needs to pickle the query set we
 shouldn't have to change the QS lookup to:

 guides = estinationGuide.objects.active().filter(region__pk=the_region.pk)

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13119#comment:5>
Django <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 django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to