From 343afa788080fb874bcd10eab1a1a2fede98c526 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Thu, 19 Sep 2019 13:03:25 +0200 Subject: [PATCH] Refs #29915 -- Doc'd limitation of using pattern lookups with UUIDField on PostgreSQL. --- docs/ref/models/fields.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index ac21380db2..dfd9f9b665 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -1304,6 +1304,13 @@ it is recommended to use :attr:`~Field.default`:: Note that a callable (with the parentheses omitted) is passed to ``default``, not an instance of ``UUID``. +.. admonition:: Lookups on PostgreSQL + + Using :lookup:`iexact`, :lookup:`contains`, :lookup:`icontains`, + :lookup:`startswith`, :lookup:`istartswith`, :lookup:`endswith`, or + :lookup:`iendswith` lookups on PostgreSQL don't work for values without + hyphens, because PostgreSQL stores them in a hyphenated uuid datatype type. + Relationship fields ===================