Changes between Version 178 and Version 179 of BackwardsIncompatibleChanges


Ignore:
Timestamp:
07/04/2008 01:44:36 AM (7 years ago)
Author:
mtredinnick
Comment:

Removed changed from r7773. It's not longer relevant.

Legend:

Unmodified
Added
Removed
Modified
  • BackwardsIncompatibleChanges

    v178 v179  
    5656 * [7477] April 27, 2008 [#Queryset-refactormerge Queryset-refactor merge]
    5757 * [7574] June 4, 2008 [#TightenedupForeignKeyassignment Tightened up ForeignKey assignment]
    58  * [7773] June 26, 2008 [#ChangedWhereNodeInternals Changed Where Node Internals]
    5958 * [7794] June 30, 2008 [#RemovedOrderingField Removed OrderingField]
    6059 * [7798] June 30, 2008 [#ExactComparisonsRespectCaseInMySQL Exact Comparisons Respect Case In MySQL]
     
    612611  * Cache the set value at set time instead of just at lookup time. This avoids race conditions when saving related objects along with their parents and was the original impetus for the change (see #6886).
    613612
    614 == Changed Where Node Internals ==
    615 For anybody writing custom Q-like objects or advanced filter additions with the !QuerySet class, [7773] changed the information that is passed to the Where class by default. A standard leaf node in the Where class used to be
    616 
    617 {{{
    618 #!python
    619 [table_alias, field_name, field_instance, lookup_type, value]
    620 }}}
    621 
    622 This changeset removed the need to store any field instances (in `field_instance`) or model references (in the `value`). The new list in the leaf nodes is now
    623 
    624 {{{
    625 #!python
    626 [table_alias, field_name, db_type, lookup_type, value_annotation, params]
    627 }}}
    628 
    629 The `db_type` is the result of `field.db_type()` or `None` if `field` was None previously. The `value_annotation` is usually `bool(value)`, but it is `datetime.datetime` if the previous `value` was a datetime. Finally, `params` is the result of `value.db_prep_lookup()` or equivalent and must be a sequence (so if you're passing in a value directly, wrap it in a list or a tuple).
    630 
    631 Again, this will not affect most code, but people writing customised things will need to adjust. Fortunately, since the list is now one component longer, if you miss a change, your code will fail drastically so you will notice.
    632 
    633613== Removed !OrderingField ==
    634614In [7794], a model field that had no use was removed (!OrderingField). It was introduced in the magic-removal branch to support a feature that was never completed, so the code isn't useful in Django any longer.
Back to Top