Hi everyone,

first post on the list. I searched the answer in the docs and in the ml
archives, but couldn't find it.

I have a traditional SLQAlchemy mapped class like the following:

user_table = Table(...)

class User(object):
    def _set_password(self, password):
        """Run cleartext password through the hash algorithm before
saving."""
        self._password = encrypt_password(password)

    def _get_password(self):
        """Returns password."""
        return self._password

    # 'password' is a table column
    password = property(_get_password, _set_password)

mapper(User, user_table)


How would I do that with an elixir.Entity base class? I only found how
to define a method that mangles the value on read access, but how do I
do this when setting a property?


Chris

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to