From 6f6043fd26a83bd0625ce34e1f64a1663fec26db Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 3 Aug 2015 16:27:49 -0400 Subject: [1.8.x] Fixed #25212 -- Documented the RawSQL expression. Backport of 97fa7fe961f961b6c93a11b50a7a1ed35c8bce8d from master --- docs/ref/databases.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'docs/ref/databases.txt') diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt index abc7828fd5..1b601234bf 100644 --- a/docs/ref/databases.txt +++ b/docs/ref/databases.txt @@ -558,11 +558,13 @@ query for ``WHERE mycolumn=0``, both rows will match. Similarly, ``WHERE mycolum will match the value ``'abc1'``. Therefore, string type fields included in Django will always cast the value to a string before using it in a query. -If you implement custom model fields that inherit from :class:`~django.db.models.Field` -directly, are overriding :meth:`~django.db.models.Field.get_prep_value`, or use -:meth:`extra() ` or -:meth:`raw() `, you should ensure that you -perform the appropriate typecasting. +If you implement custom model fields that inherit from +:class:`~django.db.models.Field` directly, are overriding +:meth:`~django.db.models.Field.get_prep_value`, or use +:class:`~django.db.models.expressions.RawSQL`, +:meth:`~django.db.models.query.QuerySet.extra`, or +:meth:`~django.db.models.Manager.raw`, you should ensure that you perform +appropriate typecasting. .. _sqlite-notes: -- cgit v1.3