From: Mike Bayer Date: Mon, 17 Oct 2011 16:58:52 +0000 (-0400) Subject: and i screwed it up X-Git-Tag: rel_0_7_4~80 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=83d431048cd3aae409a4a13791b5f5d59af26023;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git and i screwed it up --- diff --git a/lib/sqlalchemy/ext/declarative.py b/lib/sqlalchemy/ext/declarative.py index 1909d2912e..e3e269bebb 100755 --- a/lib/sqlalchemy/ext/declarative.py +++ b/lib/sqlalchemy/ext/declarative.py @@ -554,7 +554,12 @@ the above example would work just as well with:: class MyModel(Base, MyMixin): name = Column(String(1000)) -Because "name" is only present on ``MyMixin``. +This works because ``Base`` here doesn't define any of the +variables that ``MyMixin`` defines, i.e. ``__tablename__``, +``__table_args__``, ``id``, etc. If the ``Base`` did define +an attribute of the same name, the class placed first in the +inherits list would determine which attribute is used on the +newly defined class Augmenting the Base ~~~~~~~~~~~~~~~~~~~