Changes between Initial Version and Version 1 of Ticket #34321


Ignore:
Timestamp:
Feb 8, 2023, 3:48:49 AM (23 months ago)
Author:
Mahardhika Praja
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #34321 – Description

    initial v1  
    1717
    1818Fields `"mymodel"."f2"` and `"mymodel"."f3"` are excluded from column selection
     19
     20Another try
     21
     22{{{#!python
     23print(str(MyModel.objects.select_related('ref').only('f1', 'f2', 'f3', 'ref__f1').query))
     24}}}
     25
     26Output
     27{{{
     28'SELECT "mymodel"."id", "mymodel"."f1", "mymodel"."f2", "mymodel"."f3", "mymodel"."ref_id", T2."id", T2."f1", T2."f2", T2."f3", T2."ref_id" FROM "mymodel" INNER JOIN "mymodel" T2 ON ("mymodel"."ref_id" = T2."id")'
     29}}}
     30
Back to Top