From 83d431048cd3aae409a4a13791b5f5d59af26023 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 17 Oct 2011 12:58:52 -0400 Subject: [PATCH] and i screwed it up --- lib/sqlalchemy/ext/declarative.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 ~~~~~~~~~~~~~~~~~~~ -- 2.47.3