[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2044) DefaultMergeEventListener.entityIsDetached call StaleObjectStateException with wrong identifier
Salvatore Insalaco (JIRA)
noreply at atlassian.com
Thu Aug 31 10:37:24 EDT 2006
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2044?page=comments#action_24254 ]
Salvatore Insalaco commented on HHH-2044:
-----------------------------------------
There was a little cut-and-past typo in the last code snippet. It is:
Serializable id = event.getRequestedId();
if ( id == null ) {
id = persister.getIdentifier( entity, source.getEntityMode() );
}
> DefaultMergeEventListener.entityIsDetached call StaleObjectStateException with wrong identifier
> -----------------------------------------------------------------------------------------------
>
> Key: HHH-2044
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2044
> Project: Hibernate3
> Type: Bug
> Versions: 3.2.0.cr4
> Reporter: Salvatore Insalaco
> Priority: Minor
>
>
> At line 241:
> throw new StaleObjectStateException( entityName, event.getRequestedId() );
> Should be:
> throw new StaleObjectStateException( entityName, id );
> Because:
> if ( id == null ) {
> id = persister.getIdentifier( entity, source.getEntityMode() );
> }
> Otherwise sometimes the ID reported by StaleObjectException is null.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list