Hi all, I've got two tables: Users (id, password) and UserProperties (user_id, name, value). Is there a way to map the properties stored in UserProperties as attributes of User object?
I mean, john = User('john', 'password') john.name = "John Smith" # creates UserProperty('john', 'name', 'John Smith') The set of possible attributes is fixed so I don't mind hard-wiring them to the User object one by one, something like that: class User(...): ... name = some_magic_function(UserProperty, 'name') address = some_magic_function(UserProperty, 'address') I've read on association_proxy but couldn't figure out how to use it in this case. Thanks, -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.