django/tests/composite_pk
Hal Blackburn 74564946c3
Some checks are pending
Docs / spelling (push) Waiting to run
Docs / blacken-docs (push) Waiting to run
Docs / lint-docs (push) Waiting to run
Linters / flake8 (push) Waiting to run
Linters / isort (push) Waiting to run
Linters / black (push) Waiting to run
Tests / Windows, SQLite, Python 3.14 (push) Waiting to run
Tests / JavaScript tests (push) Waiting to run
Fixed #36704 -- Fixed system check error for proxy model with a composite pk.
Proxy models subclassing a model with a CompositePrimaryKey were
incorrectly reporting check errors because the check that requires only
local fields to be used in a composite pk was evaluated against the proxy
subclass, which has no fields.

To fix this, composite pk field checks are not evaluated against
proxy subclasses, as none of the checks are applicable to proxy
subclasses. This also has the benefit of not double-reporting real check
errors from an invalid superclass pk.

Thanks Clifford Gama for the review.
2025-11-04 11:59:21 -05:00
..
fixtures Refs #36075 -- Used field in pk_fields over field.primary_key. 2025-01-13 12:04:59 +01:00
models Fixed #36373 -- Fixed select_related() crash on foreign object for a composite pk. 2025-05-12 12:33:07 +01:00
__init__.py
test_aggregate.py Refs #36648 -- Removed hardcoded pk in CompositePKAggregateTests. 2025-10-15 23:44:14 -04:00
test_checks.py Fixed #36704 -- Fixed system check error for proxy model with a composite pk. 2025-11-04 11:59:21 -05:00
test_create.py Fixed #36064 -- Skipped an UPDATE when adding a model instance with a composite primary key with default values. 2025-01-10 11:43:38 +01:00
test_delete.py
test_filter.py Fixed #36584, Refs #36149 -- Allowed subquery values against tuple in lookup via ForeignObject. 2025-09-19 13:15:41 -04:00
test_get.py Fixed #36100 -- Checked if composite pk is set in get_next/get_previous. 2025-01-15 17:23:46 +01:00
test_models.py Refs #36075 -- Used field in pk_fields over field.primary_key. 2025-01-13 12:04:59 +01:00
test_names_to_path.py
test_order_by.py Fixed #36065 -- Fixed ordering by expression referencing composite primary key. 2025-01-08 10:20:48 +01:00
test_update.py Fixed #35453 -- Made ManyToManyField.concrete False. 2025-09-22 09:52:22 -04:00
test_values.py Fixed #36431 -- Returned tuples for multi-column ForeignObject in values()/values_list(). 2025-08-29 15:33:44 -04:00
tests.py Fixed #36605 -- Added support for QuerySet.in_bulk() after .values() or .values_list(). 2025-09-25 08:51:43 -04:00