Fixed #13739 -- Updated release notes to make a note of the changes to Field.db_type.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13350 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2010-06-11 01:37:10 +00:00
parent 2597f31ed4
commit ab908685fb
1 changed files with 19 additions and 14 deletions

View File

@ -435,6 +435,8 @@ database-compatible values. A custom field might look something like::
class CustomModelField(models.Field): class CustomModelField(models.Field):
# ... # ...
def db_type(self):
# ...
def get_db_prep_save(self, value): def get_db_prep_save(self, value):
# ... # ...
@ -451,6 +453,9 @@ two extra methods have been introduced::
class CustomModelField(models.Field): class CustomModelField(models.Field):
# ... # ...
def db_type(self, connection):
# ...
def get_prep_value(self, value): def get_prep_value(self, value):
# ... # ...
@ -467,10 +472,10 @@ two extra methods have been introduced::
# ... # ...
These changes are required to support multiple databases -- These changes are required to support multiple databases --
``get_db_prep_*`` can no longer make any assumptions regarding the ``db_type`` and ``get_db_prep_*`` can no longer make any assumptions
database for which it is preparing. The ``connection`` argument now regarding the database for which it is preparing. The ``connection``
provides the preparation methods with the specific connection for argument now provides the preparation methods with the specific
which the value is being prepared. connection for which the value is being prepared.
The two new methods exist to differentiate general data-preparation The two new methods exist to differentiate general data-preparation
requirements from requirements that are database-specific. The requirements from requirements that are database-specific. The