Constant property/column value for objects in SQLAlchemy
i have a class
class User:
constant_value = 5
when i use "mapper" the property goes away. how do i preserve this?开发者_如何学JAVA
Use exclude_properties:
mapper(Address, addresses_table,
exclude_properties=['street', 'city', 'state', 'zip'])
精彩评论