use expire_on_commit=False for sessionmaker

read more at http://docs.sqlalchemy.org/en/latest/orm/session.html#committing