On Oct 4, 2010, at 8:06 PM, Mark Erbaugh wrote: > > Thanks. What is the purpose of > >>> SELECT period.realperiod AS period_realperiod >>> FROM period >>> WHERE period.cycle = ? > > that appears to be generated by the session.query ... call?
the delete() and update() methods on Query want to invalidate all objects currently in the session which match the criterion. There are three options for this behavior, and in 0.5 the default is "fetch" which is what that appears to be doing. I would set it to "evaluate" so that it only scans through memory instead of hitting the DB, or None so that it doesn't invalidate anything, if you aren't concerned about coming across those objects in the same transaction. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.