DatabaseMapping keeps an empty commit around while database connection is open which is used to provide a commit id for things that are still being added/updated. The commit becomes a concrete commit once the session is actually committed. The empty commit is an implementation detail and should not be exposed to users. However, it can be queried using commit_sq.
We could do the following changes to hide the empty commit:
Force commit message by raising an exception in commit_session() if the message is empty
Filter out commits without messages (empty comment column) in commit_sq
DatabaseMapping keeps an empty commit around while database connection is open which is used to provide a commit id for things that are still being added/updated. The commit becomes a concrete commit once the session is actually committed. The empty commit is an implementation detail and should not be exposed to users. However, it can be queried using
commit_sq
.We could do the following changes to hide the empty commit:
commit_session()
if the message is emptycommit_sq