[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2937) NullPointException during flush if getSnapshot return null
Emilio Dolce (JIRA)
noreply at atlassian.com
Thu Nov 8 15:28:29 EST 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_28740 ]
Emilio Dolce commented on HHH-2937:
-----------------------------------
It is a real NPE, but I'm sorry I have not a test case for this issue to be executed in isolation.
It is related to a delete operation of a parent entity with a filled one-to-many relation, recovered from the http session, so launched into a new hibernate session.
Therefore I think that is correct to assume that, if a snapshot is not found, the collection is to be considered dirty.
For the moment I resolved this issue by creating a custom PersistentBag that overwrite the equalsSnapshot method.
Thanks for a very prompt answer.
> NullPointException during flush if getSnapshot return null
> ----------------------------------------------------------
>
> Key: HHH-2937
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2937
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Affects Versions: 3.2.2
> Environment: Windows
> Reporter: Emilio Dolce
>
> The method equalsSnapshot of the PersistentBag class do not check if returned snapshot is null causing a NullPointException.
> Please che the next condition with this:
> if ( sn == null || sn.size()!=bag.size() ) return false;
--
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