records update/added by a mapper extension during a flush are not flushed

Issue #1453 resolved
Former user created an issue

If you use a mapper extension which updates other records or adds new records these are not written to disk until a later flush call. Hence the disk copy is not fully written.

This was spotted during some unit tests which did DBSession.flush/DBSession.expunge_all before testing the data had been written by reading from the database.

Comments (2)

  1. Mike Bayer repo owner

    this is by design. If you'd like to affect the contents of a flush within an extension, use SessionExtension.before_flush().

  2. Log in to comment