Re: [sqlalchemy] Cancel update and delete before commit

2017-12-08 Thread Mike Bayer
On Fri, Dec 8, 2017 at 3:29 AM, Tolstov Sergey wrote: > I need to switch off changing (not new) database rows and write all changes > to specific table on event "before_commit". > > But when i try to use config.session.rollback() SqlAlchemy show me > > AttributeError:

[sqlalchemy] Cancel update and delete before commit

2017-12-08 Thread Tolstov Sergey
I need to *switch off changing* (not new) database rows and write all changes to specific table on event "*before_commit*". But when i try to use *config.session.rollback()* SqlAlchemy show me *AttributeError: 'NoneType' object has no attribute 'transaction'* I try config.session.expunge

[sqlalchemy] Re: Not able to filter json column filter in flask-sqlalchemy

2017-12-08 Thread shrey . chauhan
One more doubt is, is there a way to filter on the full json something like this: in your example only: print(Session.query(Student).filter(Student.data_test =={'foo':'bar'}).first()) -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post