Opened 17 years ago
Last modified 14 years ago
#8063 closed
Taking a slice of a queryset with extras specified alters the query — at Version 3
| Reported by: | zbyte64 | Owned by: | nobody |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | dev |
| Severity: | Keywords: | queryset | |
| Cc: | zbyte64@… | Triage Stage: | Accepted |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
If you do a qs as the following:
>>> foo = MyObjects.objects.all().extra(select={'relevance': match_expr}, where=[match_expr], params=[query]) >>> print foo >>> bar = MyObjects.objects.all().extra(select={'relevance': match_expr}, where=[match_expr], params=[query]) >>> print bar[:10]
The first 10 elements of foo may not match bar, bar will simply be the first 10 objects and it discards the extra where clause.
Change History (3)
comment:1 by , 17 years ago
| Component: | Uncategorized → Database wrapper |
|---|
comment:2 by , 17 years ago
| milestone: | → 1.0 |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
comment:3 by , 17 years ago
| Description: | modified (diff) |
|---|
Note:
See TracTickets
for help on using tickets.