#7862: query result set should use same query object passed into query method.
----------------------------------+-----------------------------------------
 Reporter:  [EMAIL PROTECTED]  |       Owner:  nobody    
   Status:  new                   |   Milestone:            
Component:  Database wrapper      |     Version:  SVN       
 Keywords:                        |       Stage:  Unreviewed
Has_patch:  0                     |  
----------------------------------+-----------------------------------------
 This code:
 {{{
 user = get_object_or_404(User, pk=100)
 profile = UserProfile.objects.get(user=user)
 # Here id(user) != id(profile.user), there are 2 different objects.
 # And user.save() will override profile.user.save(), in some complex code
 may be cause bugs.
 }}}
 If use Model instance to do query, results should use these model
 instance.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/7862>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to