Changes between Version 8 and Version 9 of QuerysetRefactorBranch

03/21/08 07:38:20 (6 years ago)

Updated with the last week's progress.


  • QuerysetRefactorBranch

    v8 v9  
    11= The queryset-refactor branch = 
    3 (Up to date as of 14 March, 2008) 
     3(Up to date as of 22 March, 2008) 
    55This branch contains a major refactoring of the {{{django.db.models.query.QuerySet}}} class to fix a group of SQL problems and make SQL generation easier for database backends requiring customization. 
    1919At the moment, the branch should be fairly usable for people wishing to test (with the exception of the Oracle backend, as noted below). It is not appropriate for production usage. Some of the new features, such as model inheritance still have rough edges or are incomplete, but all the porting work is complete and code that fixed existing bugs should all work. There are still some internal changes that need to be made prior to merging with trunk, so any code that tries to rely on internal methods may need to change before the next release. 
    21 Bug reports against code not listed in the [#Workinprogress work in progress] section should be filed in Trac. Please take some extra effort to check for duplicates first. 
     21Bug reports against code '''not''' listed in the [#Workinprogress work in progress] section should be filed in Trac. Please take some extra effort to check for duplicates first. 
    2323Tickets of interest for this branch are marked with ''qs-rf'' (and ''qs-rf-fixed'' when fixed) in the keywords field in Trac. [ This report] shows all the tickets being worked on (To view ''qs-rf'' with the ''qs-rf-fixed'' tagged tickets, [ view this report]). 
    5353qs.extra(select={'a': ...}, order_by=('a',))   # New style 
    5454   }}} 
     55 * Still on {{{extra(select=...)}}}... if you want to substitute parameters into these extra selection columns, use the {{{select_params}}} argument to {{{extra()}}}. The {{{params}}} arumgent is only applied to the extra where conditions. 
     56 * {{{select_related(False)}}} is no longer possible. Don't worry. You didn't know this existed, so you won't miss it. It was never part of the official API. 
     57 * There is a slight difference between these two filter statements 
     58   {{{ 
     61qs.objects.filter(f1, f2) 
     62   }}} 
     63   This difference only applies when `f1` and `f2` are referencing the same multi-valued relationship (a `ManyToManyField` or reverse `ForeignKey`). The first version allows filtering against different items from the relationship (things that match `f1` on one object in the related table as well as `f2` on another object in the related table), whereas the second version's filters will be applied to the same item. See the database API documentation section called "Lookups that span relationships" for details.  
    5665== Work in progress == 
    6069 * Model inheritance has not been integrated into the admin. It's unclear at this time whether it will be worth doing this for existing admin or just port straight to newforms-admin. In any case, trying to use multi-table inheritance via the admin interface won't work. 
    6170 * {{{OneToOneField}}} in the admin interface has similar problems. 
    62  * The Oracle backend has not been ported yet. This won't be particularly difficult, but it's still work to be done. Justin Bronn has started the ball rolling with a patch in #6161 that will be used as the base. 
    63  * {{{exclude()}}} handling for particularly twisted filter combinations is still being bullet-proofed. It should work in almost all cases, but check the results carefully at the moment if you're doing something complex.