#12685: Serialized objects' save function does not respect force_insert
------------------------------------------+---------------------------------
 Reporter:  dcotruta                      |       Owner:  nobody    
   Status:  new                           |   Milestone:            
Component:  Database layer (models, ORM)  |     Version:  1.1       
 Keywords:                                |       Stage:  Unreviewed
Has_patch:  0                             |  
------------------------------------------+---------------------------------
 Given a serialized trivial object, of the type models.Model, which does
 not override any functions, a deserialized object does not accept the
 force_insert keyword argument for its save function.

 class XYZ(models.Model):
     xyz_creation_date = models.DateTimeField(verbose_name=_("Date
 Opened"),
                                          blank=False,
                                          auto_now_add=True,
                                          editable=False
                                          )

     xyz_is_open = models.BooleanField(default=True)

     xyz_last_updated = models.DateTimeField(verbose_name=_("Last Report"),
                                         blank=False,
                                         auto_now=True
                                         )

     xyz_synced = models.BooleanField(default=False)

 If this model exists on two separate servers, and instances of this object
 are serialized, passed over the wire, and then deserialized, the save
 function on the receiving server cannot pass force_insert=True - doing so
 yields "save() got an unexpected keyword argument 'force_insert'".

 Any ideas?

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