Changes between Initial Version and Version 2 of Ticket #30129
- Timestamp:
- Jan 24, 2019, 2:52:13 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #30129
- Property Easy pickings unset
- Property Summary Request to Allow F() Expressions in Subquery() on Insert → Allow creating models with fields values as a Subquery() with F() expressions
-
Ticket #30129 – Description
initial v2 28 28 item=item, 29 29 version_number=Subquery( 30 item.versions.order_by('- 30 item.versions.order_by('-version_number').annotate( 31 31 max_version_number=Coalesce(Max('version_number'), 0) 32 32 ).annotate( 33 33 new_version_number=F('max_version_number) + 1 34 ).values('new_version_number') [:1]34 ).values('new_version_number') 35 35 ) 36 36 )