python - SQLAlchemy hybrid_property error when setting -


I'm trying to use a hybrid_property decorator to define a gestਟਰ / setter. Here's the code.

  class user (object): def __init __ (self, user name, uid = none, password = none, group_uid = none): self.uid = uid self.username = Username self.password = password self.group_uid = group_uid def __repr __ (self): return "user (% (user name) s)"% self .__ dict__ @ hybrid_property df password (self): return self._password @ password. Setter def set_password (auto, password): self._password = password  

When user watches the object, gates works properly, meaning user.password The string is produced, but the caller to the following is produced

Any help while pointing to something I'm missing will be highly appreciated.

The use of PS SQLite version 0.9.1

Original Model Classic Mapping Style Was using. To use the model to fix the problem of the duplicate mapping style, I think hybrid properties work only when the class is using declarative basis.


Comments