From 69251e5000e48ea03db0444ade937cf32017db7a Mon Sep 17 00:00:00 2001 From: Ross Lawley Date: Mon, 5 Mar 2012 11:35:12 +0000 Subject: [PATCH] Updated docs --- docs/guide/defining-documents.rst | 5 +++++ docs/upgrade.rst | 3 +++ 2 files changed, 8 insertions(+) diff --git a/docs/guide/defining-documents.rst b/docs/guide/defining-documents.rst index 1565c50c..f93b458a 100644 --- a/docs/guide/defining-documents.rst +++ b/docs/guide/defining-documents.rst @@ -533,10 +533,15 @@ convenient and efficient retrieval of related documents:: class Page(Document): title = StringField(max_length=200, required=True) + meta = {'allow_inheritance': True} + # Also stored in the collection named 'page' class DatedPage(Page): date = DateTimeField() +.. note:: From 0.7 onwards you must declare `allow_inheritance` in the document +meta. + Working with existing data -------------------------- To enable correct retrieval of documents involved in this kind of heirarchy, diff --git a/docs/upgrade.rst b/docs/upgrade.rst index d406688c..0dec8c89 100644 --- a/docs/upgrade.rst +++ b/docs/upgrade.rst @@ -15,6 +15,9 @@ Document._get_subclasses - Is no longer used and the class method has been remov Document.objects.with_id - now raises an InvalidQueryError if used with a filter. +FutureWarning - A future warning has been added to all inherited classes that +don't define `allow_inheritance` in their meta. + 0.4 to 0.5 ===========