Changes between Initial Version and Version 2 of Ticket #34413
- Timestamp:
- Mar 13, 2023, 4:46:41 PM (20 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #34413
- Property Needs tests set
-
Ticket #34413 – Description
initial v2 8 8 9 9 I did not yet check what querysets will be problematic. For example a sliced queryset would (very likely) not work, and likely most/all restrictions already in place for a the queryset of a `Prefetch` object are still applicable. 10 11 A simple demonstration of the `PrefetchEarliest` could be: 12 13 {{{ 14 User.objects.prefetch_related(PrefetchEarliest('groups', to_attr='first_group', Group.objects.order_by('name')) 15 }}} 16 17 This will then annotate `.first_group` to each `User` in the queryset with the group for that user that is by name (lexicographically) first for example.