]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
and i screwed it up
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 17 Oct 2011 16:58:52 +0000 (12:58 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 17 Oct 2011 16:58:52 +0000 (12:58 -0400)
lib/sqlalchemy/ext/declarative.py

index 1909d2912eab82720e6dda95d2336330272cc058..e3e269bebb784ef3a0ac7fabf7089c3a1b5c9295 100755 (executable)
@@ -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
 ~~~~~~~~~~~~~~~~~~~