#8892: ForeignKey relation not saved as expected
---------------------------------------------------+------------------------
          Reporter:  julien                        |         Owner:  nobody
            Status:  reopened                      |     Milestone:        
         Component:  Database layer (models, ORM)  |       Version:  1.0   
        Resolution:                                |      Keywords:        
             Stage:  Accepted                      |     Has_patch:  0     
        Needs_docs:  0                             |   Needs_tests:  0     
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Comment (by Valera Grishin):

 I step at the same problem last week and think julien is right in his
 assumption. It is quite natural to instantiate models first, than fill
 them with appropriate data, and finally save models in bulk.

 Imagine a case when ModelA instance is irrelevant without corresponding
 ModelB instance. Separated saves will cause one model, say ModelA, to be
 saved, then find that ModelB cannot be saved for some reason, thus causing
 ModelA to be deleted right after it has been saved.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8892#comment:6>
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 [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