Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/impl
In directory sc8-pr-cvs1:/tmp/cvs-serv23316/hibernate/impl
Modified Files:
SessionImpl.java
Log Message:
fixed a bug where references to self from an entity with a natively generated id were not getting nullified
Index: SessionImpl.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/impl/SessionImpl.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** SessionImpl.java 6 Apr 2003 10:11:09 -0000 1.33
--- SessionImpl.java 16 Apr 2003 01:13:27 -0000 1.34
***************
*** 813,818 ****
}
!
! if (object==self) return false; // was a reference to self, so don't need to nullify
// See if the entity is already bound to this session, if not look at the
--- 813,820 ----
}
! // if it was a reference to self, don't need to nullify
! // unless we are using native id generation, in which
! // case we definitely need to nullify
! if (object==self) return earlyInsert;
// See if the entity is already bound to this session, if not look at the
|