summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/contenttypes.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/contenttypes.txt b/docs/contenttypes.txt
index a07ff5d70d..84e38020bc 100644
--- a/docs/contenttypes.txt
+++ b/docs/contenttypes.txt
@@ -227,6 +227,16 @@ creating a ``TaggedItem``::
>>> t.content_object
<User: Guido>
+Due to the way ``GenericForeignKey`` is implemeneted, you cannot use such
+fields directly with filters (``filter()`` and ``exclude()``, for example) via
+the database API. They aren't normal field objects. These examples will *not*
+work::
+
+ # This will fail
+ >>> TaggedItem.objects.filter(content_object=guido)
+ # This will also fail
+ >>> TaggedItem.objects.get(content_object=guido)
+
Reverse generic relations
-------------------------