Opened 10 years ago

Closed 10 years ago

#1152 closed defect (invalid)

distinct keyword in model seems not working

Reported by: hipertracker@… Owned by: adrian
Component: Core (Other) Version: 0.90
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

How to limit records with "distinct" keywords if every model seems to return all fields (together with primary key)? SELECT DISTINCT field1,field2 ... has sense only when primary key is not included in the field list. I checked the code and I could see Django always uses fields defined in model class + primary key...

Change History (1)

comment:1 Changed 10 years ago by adrian

  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.
Back to Top