Changes between Initial Version and Version 1 of Ticket #34321
- Timestamp:
- Feb 8, 2023, 3:48:49 AM (23 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #34321 – Description
initial v1 17 17 18 18 Fields `"mymodel"."f2"` and `"mymodel"."f3"` are excluded from column selection 19 20 Another try 21 22 {{{#!python 23 print(str(MyModel.objects.select_related('ref').only('f1', 'f2', 'f3', 'ref__f1').query)) 24 }}} 25 26 Output 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