isn't a mixin - evaluation is at the same time as if
@classproperty weren't used. But here we at least allow
it to function as expected.
-
+
+ - Fixed bug where "Can't add additional column" message
+ would display the wrong name.
+
- mssql
- Fixed "default schema" query to work with
pymssql backend.
cls._decl_class_registry[classname] = cls
our_stuff = util.OrderedDict()
+
for k in dict_:
value = dict_[k]
if isinstance(value, util.classproperty):
if not table.c.contains_column(c):
raise exceptions.ArgumentError(
"Can't add additional column %r when "
- "specifying __table__" % key
+ "specifying __table__" % c.key
)
if 'inherits' not in mapper_args:
def test_table_in_model_and_different_named_column_in_mixin(self):
class ColumnMixin:
-
tada = Column(Integer)
-
+
+
def go():
class Model(Base, ColumnMixin):
- __table__ = Table('foo', Base.metadata, Column('data',
- Integer), Column('id', Integer,
- primary_key=True))
-
+ __table__ = Table('foo', Base.metadata,
+ Column('data',Integer),
+ Column('id', Integer,primary_key=True))
+ foo = relationship("Dest")
+
assert_raises_message(sa.exc.ArgumentError,
"Can't add additional column 'tada' when "
"specifying __table__", go)