The collection.link decorator doesn't work

Issue #2653 resolved
Luca Wehrstedt created an issue

I'm opening this bug report after the following mailing list discussion:

https://groups.google.com/d/msg/sqlalchemy/-/SuJLukrnfg4J

The issue is that the @collection.link decorator and the _instrument_class decorator use the "link" role name and thus set the linker method to the "_sa_link" attribute of the collection class. But the CollectionAdapter uses the "_sa_on_link" attribute to notify the collection of link and unlink events.

The following pull request proposes a fix:

https://bitbucket.org/sqlalchemy/sqlalchemy/pull-request/36/fix-the-collectionlink-decorator

Comments (2)

  1. Log in to comment