Fields custom getters and setters
rmk135 opened this issue · 1 comments
rmk135 commented
The idea is to create functionality for specification of custom getters and setters for domain model fields.
class Profile(models.DomainModel):
id = fields.Int()
open_id = fields.Int()
@open_id.getter
def _get_oid(self):
return self.id >> 8
@open_id.setter
def _set_oid(self, value):
self.id = value << 8
Notes:
- If custom getter / setter is specified, it completely replaces field's getter / setter logic.