008eeed
Flush the session before calling session.commit() to ensure before_commit event has compose ids.