I just realised the following issue:
When I create the following relationship:
class Container(Base):
__metaclass__ = VersionedMeta
__tablename__ = 'container'
__table_args__ = {'schema':'storage'}
id = Column(Integer, primary_key=True)
discriminator = Column('type', String(64))
token = Column(String(128), nullable=False)
description = Column(String)
__mapper_args__ = {'polymorphic_on': discriminator,
'polymorphic_identity':'container'}
class Box(Container):
__metaclass__ = VersionedMeta
__tablename__ = 'box'
__table_args__ = {'schema':'storage'}
__mapper_args__ = {'polymorphic_identity': 'box'}
id = Column(Integer, ForeignKey('storage.container.id',
onupdate="cascade", ondelete="cascade"), primary_key=True)
barcode = Column(String(64))
Even though box_history gets created, no "version" column is added to the
box table and any modification to a Box entity does not log the change in
the _history table.
Could anyone please point out what I'm doing wrong ?
I tried removing the metaclass declaration from the Box entity since it
would basically inherit it from Container but that didn't help in solving my
issue.
Thank you !!
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/sqlalchemy/-/PK3kVAsuh5QJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.