[Hibernate-JIRA] Created: (HHH-6361) Collection events may contain wrong stored snapshot after merging a detached entity into the persistencecontext
by Erik-Berndt Scheper (JIRA)
Collection events may contain wrong stored snapshot after merging a detached entity into the persistencecontext
---------------------------------------------------------------------------------------------------------------
Key: HHH-6361
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6361
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.6.5
Reporter: Erik-Berndt Scheper
Priority: Minor
After the merge process, driven by the {{DefaultMergeEventListener}}, it can happen that the Hibernate collection events contain references to an incorrect stored snapshot. This is both the case for the {{PersistentCollection}} and the {{CollectionEntry}}, as returned by {{session.getPersistenceContext().getCollectionEntry(persistentCollection)}}
By itself, this looks like a minor issue. However, this leads to severe problems when Envers is used. This bug causes HHH-6349, which results in inconsistent (invalid) audit trails and possibly AssertionFailures when the {{ValidityAuditStrategy}} is used.
I am pretty sure the same bug exists in the 4.0.0 Betas, since I have an Envers testcase for testng (3.6 branch) and junit4 (master) which both exhibit the same behaviour. However, I haven't looked in the changes in the merge process in 4.0.0 betas (compared to 3.6.x).
I am currently preparing a testcase for the Hibernate testsuite (complimentary to the Envers testcases) together with a suggested fix, but this takes a bit more work than I anticipated.
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 2 months
[Hibernate-JIRA] Created: (HHH-7235) Support null NaturalId values in loadEntityIdByNaturalId query
by Guenther Demetz (JIRA)
Support null NaturalId values in loadEntityIdByNaturalId query
--------------------------------------------------------------
Key: HHH-7235
URL: https://hibernate.onjira.com/browse/HHH-7235
Project: Hibernate ORM
Issue Type: Improvement
Components: core
Affects Versions: 4.1.2, 4.1.1, 4.1.0
Reporter: Guenther Demetz
As it is allowed to persist and commit null naturalId values (for example null String values),
it would also be nice to can sucessful lookup for those values.
Currently the where-clause of the lookup-query does not consider the eventuality of null values, which in sql require an extra handling (using 'is' keyword instead of '=' sign).
The needed code change is simple, see pull request.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 2 months