Suppose I have three classes User, Keyword, and UserKeyword as
described at 
http://www.sqlalchemy.org/docs/05/reference/ext/associationproxy.html#associationproxy.

In my case, my "Keyword" takes multiple arguments on init, more like

class Keyword(object):
    def __init__(self, keyword, datum1, datum2):
         ...

As you can see, this constructor expects multiple data.

I would like the association proxy to see  tuples or dicts of multiple
properties of a Keyword().  What is a reasonable way to do this?  Use
orm.composite in the UserKeyword class?


Example of what I would like:

>>> u.keywords.append(  ('kw1','d1') )
>>> u.keywords
[  ('kw1','d1'), ]


Thank you!  I hope this question is clear.   I'm still new to SA!

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

Reply via email to