I have an object that has a relation to an Attributes table.  The
Attributes table is just key/value pairs with a pointer to the object
in the main table.

I'd like to make the use of my object very simple by exposing these
object attributes as a dictionary.

So, I'd like to be able to do this:

obj.attrs['foo'] = 'a'

instead of

obj.attrs.append(Attribute('foo', 'a'))

The documentation has an example for using the collection_class
argument to relation() but in order to make things actually work as
above I think I'd need to override __setitem__ but that sqlalchemy
doesn't seem to let me do that.

What am I missing?

-Ron


--~--~---------~--~----~------------~-------~--~----~
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