Opened 13 years ago
Closed 13 years ago
#19961 closed Bug (invalid)
Examples of "Complex lookups with Q objects" using objects.get
| Reported by: | Owned by: | nobody | |
|---|---|---|---|
| Component: | Documentation | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
I see that "Complex lookups with Q objects" from
https://docs.djangoproject.com/en/1.4/topics/db/queries/
is using objects.get as example to retrieve multiple objects, but this raise a MultipleObjectsReturned exception.
Change History (1)
comment:1 by , 13 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
| Version: | 1.4 → master |
Note:
See TracTickets
for help on using tickets.
As stated in the Complex lookups with Q objects:
The examples only use
getbut I can't find that retrieve multiple objects reference, you can use complex lookups to retrieve a single object.