HHH-4958 : Immutable entity snapshot is retained after insert

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@18953 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Gail Badner 2010-03-10 09:59:43 +00:00
parent 863f378602
commit 268e778d5c
1 changed files with 2 additions and 1 deletions

View File

@ -74,7 +74,8 @@ public final class EntityEntry implements Serializable {
final boolean lazyPropertiesAreUnfetched) {
this.status=status;
this.previousStatus = null;
this.loadedState=loadedState;
// only retain loaded state if the status is not Status.READ_ONLY
if ( status != Status.READ_ONLY ) { this.loadedState = loadedState; }
this.id=id;
this.rowId=rowId;
this.existsInDatabase=existsInDatabase;