#33312: Instances with deferred fields cannot be used for copying.
-------------------------------------+-------------------------------------
     Reporter:  Adam Sołtysik        |                    Owner:  Simon
         Type:                       |  Charette
  Cleanup/optimization               |                   Status:  closed
    Component:  Database layer       |                  Version:  3.2
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce <42296566+sarahboyce@…>):

 * resolution:   => fixed
 * status:  assigned => closed

Comment:

 In [changeset:"e03e5c751c56db5f4cb99e142c92d7d8db3a5463" e03e5c75]:
 {{{#!CommitTicketReference repository=""
 revision="e03e5c751c56db5f4cb99e142c92d7d8db3a5463"
 Fixed #33312 -- Raised explicit exception when copying deferred model
 instances.

 Previously save() would crash with an attempted forced update message, and
 both
 save(force_insert=True) and bulk_create() would crash with DoesNotExist
 errors
 trying to retrieve rows with an empty primary key (id IS NULL).

 Implementing deferred field model instance copying might be doable in
 certain
 cases (e.g. when all the deferred fields are db generated) but that's not
 trivial to implement in a backward compatible way.

 Thanks Adam Sołtysik for the report and test and Clifford for the review.
 }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/33312#comment:8>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/01070196d7ba704a-4816304a-6c59-49a7-96cf-be4034db0141-000000%40eu-central-1.amazonses.com.

Reply via email to