#11811: No error raised on update(foreignkey=unsavedobject) on nullable fk
---------------------------------------------------+------------------------
          Reporter:  Afief                         |         Owner:  ashearer
            Status:  assigned                      |     Milestone:  1.2     
         Component:  Database layer (models, ORM)  |       Version:  1.1     
        Resolution:                                |      Keywords:          
             Stage:  Accepted                      |     Has_patch:  0       
        Needs_docs:  0                             |   Needs_tests:  0       
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Comment (by ashearer):

 I shouldn't have said "passing an unsaved model acts the same as passing
 None". That's true only for the ForeignKeyField as saved in the DB. (It
 doesn't matter whether the unsaved foreign model itself is saved after the
 assignment.) In memory, the attribute still points to the unsaved model
 instance.

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