Hello
To override attribute behavior the 0.5 doc gives this example:
class MyAddress(object):
def _set_email(self, email):
self._email = email
def _get_email(self):
return self._email
email = property(_get_email, _set_email)
mapper(MyAddress, addresses_table, properties = {
'email':synonym('_email', map_column=True)
})
What won't work if I just set the python property and don't use the
synonym func:
mapper(MyAddress, addresses_table)
What difference does it make? I couldn't find an explanation in the doc.
Sorry if that's a dumb question!
Thanks,
--
Eric
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" 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/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---