Re: [sqlalchemy] compare a object/instance against its data in the database

2017-06-14 Thread mike bayer
that's what is_modified(obj) does, sure On 06/14/2017 01:56 AM, Jacek Blocki wrote: Having in mind documentation remarks on is_modified for scalar values is modified = session.is_modified(obj) and obj in session.dirty a good way to determine if obj was modified? W dniu środa, 4 listopada

Re: [sqlalchemy] compare a object/instance against its data in the database

2017-06-13 Thread Jacek Blocki
Having in mind documentation remarks on is_modified for scalar values is modified = session.is_modified(obj) and obj in session.dirty a good way to determine if obj was modified? W dniu środa, 4 listopada 2015 02:03:05 UTC+1 użytkownik Michael Bayer napisał: > > > > On 11/03/2015 03:21 PM,

Re: [sqlalchemy] compare a object/instance against its data in the database

2015-11-03 Thread Mike Bayer
On 11/03/2015 03:21 PM, c.bu...@posteo.jp wrote: Is there a way to find out if a persistent sqlalchemy mapped object was modified? It means I recieve a object (persistent, with identiy) from the database. Then the user (maybe!) modify its data in a dialog-window. obj =

[sqlalchemy] compare a object/instance against its data in the database

2015-11-03 Thread c.buhtz
Is there a way to find out if a persistent sqlalchemy mapped object was modified? It means I recieve a object (persistent, with identiy) from the database. Then the user (maybe!) modify its data in a dialog-window. obj = session.query(MyClass).first() LetTheUserDoSomethingWithIt(obj) if