On Feb 7, 2012, at 11:43 AM, Wichert Akkerman wrote:

> I have been looking at making an ordered many-to-many list. The example from 
> Jason Kirkland from 2008 
> (http://groups.google.com/group/sqlalchemy/browse_thread/thread/611c88ee27354246
>  ) worked, but our version of it did not. I have modified his version (see 
> code at the end of the mail) to use declarative syntax to make it more 
> similar to others, which ended up revealing something interesting. Writing 
> the associationproxy like this:
> 
>    movies = association_proxy('usermovies', 'movie')
> 
> 
> works fine. But writing it like this:
> 
>    movies = association_proxy(usermovies, 'movie')
> 
> 
> which should be identical gives this error:

The first argument to association_proxy should be the string name of the 
attribute being proxied.     A relationship() or other object is not accepted 
here.  

http://docs.sqlalchemy.org/en/latest/orm/extensions/associationproxy.html#sqlalchemy.ext.associationproxy.association_proxy


-- 
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 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to