# HG changeset patch # User Todd Larsen # Date 1222458427 0 # Node ID 7075c27170f27ef6315279bfe228d8016ab2941a # Parent 187d45783300e31189af96c346911372acba6904 Add ModelWithFieldAttributes *before* PolyModel, so that everything does not become a "ModelWithFieldAttributes" in the Datastore. The way PolyModel works, each Model class hierarchy is stored in the Datastore as the class that directly inherited from PolyModel. So, we do not want to insert ModelWithFieldAttributes *after* PolyModel by inheriting *from* PolyModel, or everything would just be a ModelWithFieldAttributes in the Datastore, instead of Person, Work, Group, etc. diff -r 187d45783300 -r 7075c27170f2 app/polymodel/__init__.py --- a/app/polymodel/__init__.py Fri Sep 26 19:35:21 2008 +0000 +++ b/app/polymodel/__init__.py Fri Sep 26 19:47:07 2008 +0000 @@ -12,11 +12,15 @@ import sys +# Add ModelWithFieldAttributes *before* PolyModel, so that everything does +# not become a "ModelWithFieldAttributes" in the Datastore. +from soc.models import base + class Error(Exception): """Base of all exceptions in the blixt.data module.""" pass -class PolyModel(db.Model): +class PolyModel(base.ModelWithFieldAttributes): """An extension to Google App Engine models that improves the support for inheritance.