query property not applied by ScopedSession to mapped class when extension= argument is given

Issue #760 resolved
Former user created an issue

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)

  1. Log in to comment