[EMAIL PROTECTED] wrote:
> g'day
> i need to have an attribute with setter/getter, say foo, and so that 
> the underlaying DB/SA-attribute (_foo) to be completely hidden for  
> users of the class - to avoid someone setting/getting it by mistake. 
> is this possible within SA - via new AttributeAccess layer - or else?

Yep.  There are examples in examples/custom_attributes plus more in 
test/orm/extendedattr.py and test/orm/instrumentation.py.  Also doc in 
sqlalchemy.orm.attributes.  (You'll need to consult the source on that 
one until we get a doc generator that can extract attribute docstrings.)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to