[Django] #12172: Improve save() handling of deferred fields

View: New views
3 Messages — Rating Filter:   Alert me  

[Django] #12172: Improve save() handling of deferred fields

by noreply-71 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

#12172: Improve save() handling of deferred fields
------------------------------------------+---------------------------------
 Reporter:  miracle2k                     |       Owner:  nobody    
   Status:  new                           |   Milestone:            
Component:  Database layer (models, ORM)  |     Version:  1.1      
 Keywords:                                |       Stage:  Unreviewed
Has_patch:  0                             |  
------------------------------------------+---------------------------------
 Currently, when saving a model instance with deferred fields, all the
 missing fields are first pulled, one query each. This is not only very
 inefficient, of course, it also restricts the number of possible uses of
 the defer mechanism.

 For example, django-denorm needs to do an additional query when saving a
 model with cache-fields  to ensure that a potentially more recent value in
 the db is not overridden with a stale value on the field. If a field could
 just be excluded from save(), that would not be necessary.

 I'm not familiar with the Django ORM code, but wouldn't it be
 straightforward to just skip fields that are not yet loaded during a
 save()?

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


Re: [Django] #12172: Improve save() handling of deferred fields

by noreply-71 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

#12172: Improve save() handling of deferred fields
---------------------------------------------------+------------------------
          Reporter:  miracle2k                     |         Owner:  nobody
            Status:  new                           |     Milestone:        
         Component:  Database layer (models, ORM)  |       Version:  1.1  
        Resolution:                                |      Keywords:        
             Stage:  Unreviewed                    |     Has_patch:  0    
        Needs_docs:  0                             |   Needs_tests:  0    
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Changes (by miracle2k):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 FWIW, here's a reference to the django-denorm ticket:
 http://github.com/initcrash/django-denorm/issues/#issue/4

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


Re: [Django] #12172: Improve save() handling of deferred fields

by noreply-71 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

#12172: Improve save() handling of deferred fields
---------------------------------------------------+------------------------
          Reporter:  miracle2k                     |         Owner:  nobody
            Status:  new                           |     Milestone:        
         Component:  Database layer (models, ORM)  |       Version:  1.1  
        Resolution:                                |      Keywords:        
             Stage:  Unreviewed                    |     Has_patch:  0    
        Needs_docs:  0                             |   Needs_tests:  0    
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Comment (by Alex):

 This basically blocks on #4102.  I'm not going to close it as a dupe
 because technically this is just something that should be done once that's
 in.

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