Re: [sqlalchemy] Set/clear mapping for some tables only

2016-11-26 Thread Srikanth Bemineni
Hi, May be I celebrated little bit too early. It looks like for no obvious reason the scoped_session rolls back the transaction right at the last moment. Any idea on how to debug this ? View.py with session_shardid(DBSession(),table_hash): Base.metadata.create_all(DBSession().connection())

Re: [sqlalchemy] Set/clear mapping for some tables only

2016-11-26 Thread Srikanth Bemineni
Hi, Hope this helps others 1. DBSession is scoped_session. Use DBSession() to get the actual session https://pypi.python.org/pypi/zope.sqlalchemy with session_shardid(DBSession(),table_hash): Base.metadata.create_all(DBSession().connection()) 2. AttributeError: 'SessionTransaction'