Re: [sqlalchemy] session.is_modified() returns false positives sometimes

2015-12-09 Thread Mike Bayer
On 12/09/2015 02:07 AM, Юрий Пайков wrote: > > Ok, here is the test > code https://gist.github.com/ojomio/941d03b728a88d93d010 > Apart from reproducing the (seeming) problem, it prints out > "PASSIVE_NO_RESULT"(yes, you were right about the name) which is /in/ > committed_state great, thanks.

Re: [sqlalchemy] session.is_modified() returns false positives sometimes

2015-12-09 Thread Юрий Пайков
Thank you for the detailed explanation of what happens. Now I understand. Shame on me I hadn't noticed this in the docs... Everything which deals with expiration and object state business is always a bit over my head... You said it mostly the flush() business and is_modified() indeed looks like

Re: [sqlalchemy] session.is_modified() returns false positives sometimes

2015-12-09 Thread Mike Bayer
On 12/09/2015 01:18 PM, Юрий Пайков wrote: > Thank you for the detailed explanation of what happens. Now I > understand. Shame on me I hadn't noticed this in the docs... > Everything which deals with expiration and object state business is > always a bit over my head... > > You said it mostly

[sqlalchemy] session.is_modified() returns false positives sometimes

2015-12-08 Thread Юрий Пайков
I run a program which creates, fills and merges to DB a list of mapped objects. I need to know if a merge created a new instance in a database or if it updated previously existing one or if it did noop. When I know the instance is persistent, my goal is to figure out if it's going to be

Re: [sqlalchemy] session.is_modified() returns false positives sometimes

2015-12-08 Thread Mike Bayer
On 12/08/2015 07:41 AM, Юрий Пайков wrote: > I run a program which creates, fills and merges to DB a list of mapped > objects. I need to know if a merge created a new instance in a database > or if it updated previously existing one or if it did noop. When I know > the instance is persistent, my

Re: [sqlalchemy] session.is_modified() returns false positives sometimes

2015-12-08 Thread Юрий Пайков
Ok, here is the test code https://gist.github.com/ojomio/941d03b728a88d93d010 Apart from reproducing the (seeming) problem, it prints out "PASSIVE_NO_RESULT"(yes, you were right about the name) which is *in* committed_state вторник, 8 декабря 2015 г., 19:44:16 UTC+5 пользователь Michael Bayer