Python SQLAlchemy中对象的常量属性/列值
我有一节课Python SQLAlchemy中对象的常量属性/列值,python,sqlalchemy,Python,Sqlalchemy,我有一节课 class User: constant_value = 5 当我使用“mapper”时,属性消失了。如何保存此属性?使用排除属性: mapper(Address, addresses_table, exclude_properties=['street', 'city', 'state', 'zip']) 使用“排除”属性: mapper(Address, addresses_table, exclude_properti
class User:
constant_value = 5
当我使用“mapper”时,属性消失了。如何保存此属性?使用排除属性:
mapper(Address, addresses_table,
exclude_properties=['street', 'city', 'state', 'zip'])
使用“排除”属性:
mapper(Address, addresses_table,
exclude_properties=['street', 'city', 'state', 'zip'])