mirror of
https://github.com/django/django.git
synced 2025-07-24 13:44:32 +00:00
Fixed #30988 -- Deprecated the InvalidQuery exception.
It was barely documented without pointers at its defining location and was abused to prevent misuse of the QuerySet field deferring feature.
This commit is contained in:
parent
cbe4d6203f
commit
11e327a3ff
8 changed files with 82 additions and 15 deletions
|
@ -170,8 +170,9 @@ last names were both retrieved on demand when they were printed.
|
|||
|
||||
There is only one field that you can't leave out - the primary key
|
||||
field. Django uses the primary key to identify model instances, so it
|
||||
must always be included in a raw query. An ``InvalidQuery`` exception
|
||||
will be raised if you forget to include the primary key.
|
||||
must always be included in a raw query. A
|
||||
:class:`~django.core.exceptions.FieldDoesNotExist` exception will be raised if
|
||||
you forget to include the primary key.
|
||||
|
||||
Adding annotations
|
||||
------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue