A change introduced in 2.0 was that a SQLAlchemy session is closed after its objects are committed. This made the objects not available for later use, and is almost certainly not desirable. This patch reverts the change.
Note that a session should eventually be closed. In Flask, a session can be closed by being removed when an HTTP request finishes. In other scenarios, remember to close session where appropriate.