Hi,
I have a code like this:
if self.session.dirty:
for dirty in self.session.dirty:
if self.session.is_modified(dirty):
return True
if self.session.new:
for obj in self.session.new:
if self.session.is_modified(obj):
return True
I realized that if I have a session with autoflush=True, checking
is_modified(dirty_obj), triggers a flush(), so that next loop on
'session.new' would never find anything.
While I personally have non reason to keep autoflush=True, I didn't
want to force this for everybody using my library (sqlkit). Is there a
way to force is_modified (with collection) not to flush(), the same
way as session.query can be issued without flushing?
TIA
sandro
*:-)
--
http://sqlkit.argolinux.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---