mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #19580 -- Unified behavior of reverse foreign key and many-to-many relations for unsaved instances.
This commit is contained in:
committed by
Mariusz Felisiak
parent
b7f263551c
commit
7ba6ebe914
@@ -375,6 +375,14 @@ this difference. In Django 4.0 and earlier,
|
||||
second example query, but this undocumented behavior led to queries with
|
||||
excessive joins.
|
||||
|
||||
Reverse foreign key changes for unsaved model instances
|
||||
-------------------------------------------------------
|
||||
|
||||
In order to unify the behavior with many-to-many relations for unsaved model
|
||||
instances, a reverse foreign key now raises ``ValueError`` when calling
|
||||
:class:`related managers <django.db.models.fields.related.RelatedManager>` for
|
||||
unsaved objects.
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user