Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#20413 closed Bug (fixed)

respect Query.get_meta()

Reported by: Mike Fogel Owned by: Mike Fogel
Component: Database layer (models, ORM) 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

In django.db.models.sql.query.Query there's a get_meta(self) method that's present to aid in subclassing Query. See https://github.com/django/django/blob/master/django/db/models/sql/query.py#L206. Problem is, Query itself as well as its subclasses aren't using this method everywhere they could be... rather they're going around it and accessing its default return value directly. This breaks subclassing Query and overriding get_meta.

I will submit a pull request shortly with mods to Query and friends to respect this method.

Change History (2)

comment:1 by Mike Fogel <mike@…>, 12 years ago

Resolution: fixed
Status: newclosed

In 74f3884ae04ea57baee9b04ab0b5658a97cfd296:

Fixed #20413 - Respect Query.get_meta()

comment:2 by Alex Gaynor <alex.gaynor@…>, 12 years ago

In c0c3b65de99d638efcb971702a88be42f388989a:

Merge pull request #1069 from mfogel/ticket_20413

Fixed #20413 - Respect Query.get_meta()

Note: See TracTickets for help on using tickets.
Back to Top