[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-1139) getOldState() can be null (Tested with PreUpdateEventListener)
Steve Ebersole (JIRA)
noreply at atlassian.com
Mon Mar 21 13:00:51 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Ebersole closed HHH-1139.
-------------------------------
Closing stale resolved issues
> getOldState() can be null (Tested with PreUpdateEventListener)
> --------------------------------------------------------------
>
> Key: HHH-1139
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1139
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.1 rc2
> Environment: See unit test
> Reporter: Gabe H
> Assignee: Steve Ebersole
> Attachments: OldStateTest.java
>
>
> getOldState() on PreUpdateEvent (from a PreUpdateEventListener) can be null, if dealing with a persistent object across sessions.
> I think this behavior changed in rc2, but I'm not sure.
> I am not sure if this is a bug. You possibly may want to add some javadoc, that says the getOldState() is not always reliable. (Javadocs are not pretty empty in that event package ;)
> The attached unit test shows the failure.
> The case described in the unit test is one that happens in web applications where is a Hibernate session is created to render a page, and then is closed. But if a persistent object lives in the Http session, and it lives outside of a hibernate session.
> Thanks, if you have any questions about the unit test email gabrielh at gmail.com.
--
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