#35836: ORM can produce invalid SQL when subclassing Query
-------------------------------------+-------------------------------------
     Reporter:  Ben Pearman          |                    Owner:  (none)
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  5.0
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  invalid
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

 * resolution:   => invalid
 * status:  new => closed

Comment:

 Django 3.2 has been EOL for 6 months now and while we accept patch to
 allow extension of the ORM we don't offer any guarantees towards backward
 compatibility around `sql.Query` API changes.

 In other words, if you extend undocumented and unstable part of the
 framework you must be prepared to adapt your code and provide a solution
 that goes beyond bisecting the origin of your breakage.

 In the case of 14c8504a37afad96ab93cf82f47b13bcc4d00621 I think it's a
 sane change in towards extensibility and something we'd want to keep in
 `main`. `SQLQuery.get_compiler` is by no means meant to be used as a hook
 to augment the where clause of a `QuerySet`, this should be done at the
 manager level.

 At this point, even if we were to land a solution that you'd have to
 provide and build a rationale for it wouldn't make it to a public release
 until 5.2 which is meant to be released in April 2025. If your solution
 runs into problems when dealing with subqueries and you want to double
 down on this approach you should be able to identify the proper attributes
 to used specialized logic.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35836#comment:2>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107019288eeb820-11fdab76-dc34-4830-ada4-b33460d6a123-000000%40eu-central-1.amazonses.com.

Reply via email to