- attached extbug.py
query property not applied by ScopedSession to mapped class when extension= argument is given
Issue #760
resolved
When I create a scoped_session and use it's mapper() with an extension specified, the mapped class does not have the 'query' attribute.
Something like this (see attachment for repro):
class MyExt(MapperExtension):
pass
Session = scoped_session(sessionmaker())
Session.mapper(TestTable, test_table, extension=MyExt())
print TestTable.query <----- 'AttributeError: type object 'TestTable' has no attribute 'query'
When I remove the extension=MyExt() from the call to mapper, it works as expected.
Comments (5)
-
Account Deleted -
Account Deleted - attached patch.txt
patch
-
Account Deleted I've attached a patch which I fixes this issue.
-
-
repo owner - removed milestone
Removing milestone: 0.4.0 (automated comment)
- Log in to comment
Repro