#13073: Duplicate rows when checking ID
---------------------------------------------------+------------------------
Reporter: jnadro52 | Owner: nobody
Status: closed | Milestone:
Component: Database layer (models, ORM) | Version: 1.1
Resolution: invalid | Keywords:
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Changes (by kmtracey):
* status: reopened => closed
* resolution: => invalid
Comment:
It appears you are indexing into an unordered !QuerySet. The
`caches[0].id` type of query results in a database query that uses OFFSET
and LIMIT to retrieve exactly one result. If you have not done anything to
require a unique ordering for the query results the database is free to
return any matching result for any particular OFFSET (and PostgreSQL in
particular is known to take advantage of this).
--
Ticket URL: <http://code.djangoproject.com/ticket/13073#comment:3>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.