the "unique" flag was not removed from a
single-table-inheritance subclass which
generates columns to put up onto the base.
=======
CHANGES
=======
+0.7.4
+=====
+- examples
+ - Fixed bug in history_meta.py example where
+ the "unique" flag was not removed from a
+ single-table-inheritance subclass which
+ generates columns to put up onto the base.
+
0.7.3
=====
- general
for column in local_mapper.local_table.c:
if column.key not in super_history_mapper.local_table.c:
col = column.copy()
+ col.unique = False
super_history_mapper.local_table.append_column(col)
table = None
class SubClass(BaseClass):
- subname = Column(String(50))
+ subname = Column(String(50), unique=True)
__mapper_args__ = {'polymorphic_identity':'sub'}
self.create_tables()
]
)
+ # test the unique constraint on the subclass
+ # column
+ sc.name ="modifyagain"
+ sess.flush()
+
def test_unique(self):
class SomeClass(Versioned, Base, ComparableEntity):
__tablename__ = 'sometable'
__all__ = sorted(name for name, obj in locals().items()
if not (name.startswith('_') or inspect.ismodule(obj)))
-__version__ = '0.7.3'
+__version__ = '0.7.4'
del inspect, sys