我在连接表继承中有一些表,子类有父列的同义词属性:
class Parent(DeclarativeBase):
# ...
parent_column = Column(String(255))
class Child(Parent):
# ...
child_column = synonym('parent_column')
@validates('child_column') # @validates('parent_column') also does not work
def validator(self, name, value):
# not called at all
raise ValueError()
我错过了什么?这目前不可能吗?