We're updating the issue view to help you get more done. 

Session cache is not cleared after a rollback

Description

1. A transaction is initiated on a session.
2. An object is fetched from the database.
3. The object is updated in Java code.
4. The transaction is rolled back.
5. Another transaction is initiated on the same session.
6. Some data are fetched from or saved to the database.
7. The transaction is committed.
After point 7 the data that were updated in step 3 are also committed because these changes are still present in the cache. A call to session.clear() after step 4 solves the problem, but this behaviour does correspond with the normal notion of how transactions work.

Environment

Hibernate 3.1-rc1, MySQL 4.1.14

Status

Assignee

Unassigned

Reporter

Knut Olav Løite

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

3.1 rc 1

Priority

Minor