QuerySet.update() doesn't accept fkey assignment by id (with patch)
|Reported by:||Jerome Leclanche||Owned by:||Jerome Leclanche|
|Component:||Database layer (models, ORM)||Version:||master|
|Cc:||adys.wh@…, timograham@…||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
QuerySet.update doesn't accept FIELD_id assignments for ForeignKeys. This prevents the user from using the same dict to create or update a key.
Attached patch solves that problem by adding attname keys in the field cache. It may or may not be a hack.