summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/declarative.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-10-17 12:58:52 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2011-10-17 12:58:52 -0400
commit83d431048cd3aae409a4a13791b5f5d59af26023 (patch)
treee8ac1f240a0d87798bf1e98c0643c947bcad2b1d /lib/sqlalchemy/ext/declarative.py
parent1207bcc0fd6925a7322636c9334ef240822b5378 (diff)
downloadsqlalchemy-83d431048cd3aae409a4a13791b5f5d59af26023.tar.gz
and i screwed it up
Diffstat (limited to 'lib/sqlalchemy/ext/declarative.py')
-rwxr-xr-xlib/sqlalchemy/ext/declarative.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/sqlalchemy/ext/declarative.py b/lib/sqlalchemy/ext/declarative.py
index 1909d2912..e3e269beb 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
~~~~~~~~~~~~~~~~~~~