- changed status to invalid
records update/added by a mapper extension during a flush are not flushed
Issue #1453
resolved
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)
-
repo owner -
repo owner and it is documented:
- Log in to comment
this is by design. If you'd like to affect the contents of a flush within an extension, use
SessionExtension.before_flush()
.