]
Gail Badner commented on HHH-2314:
----------------------------------
Please attach a runnable test case (Java + mapping).
EntityUpdateAction does not do a deepCopy for loadedState, making
change detection of Custom Type based on a Collection not working
-----------------------------------------------------------------------------------------------------------------------------------
Key: HHH-2314
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2314
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.0.ga, 3.2.1
Environment: Hibernate 3.2.1.ga, SQLServer and Oracle 10
Reporter: arnaud.roger(a)gmail.com
Attachments: hibernatetestcase.zip
We have a User object with a roles HashSet<String> that is map with a CustomType to
VARCHAR in the database using a comma separated format.
When this Entity is manipulated through a long transaction hibernate does not detect that
the Entity is dirty and does not flush the change to the database.
This does not happen in Hibernate 3.1.1
After tracing through Hibernate I identified the bug. This is due to a change in the 3.2
branch in EntityUpdateAction
http://fisheye.jboss.org/browse/~br=tag%3Av321/Hibernate/tags/v321/Hibern...
The deepCopy is done only when hasUpdateGeneratedProperties() is true, which I is not for
our User object. So the set is not deepCopy and the lastUpdated array got a reference to
the the same set as the user object.
Any modification is so done in the lastUpdated and the User entity, making the object non
dirty.
rollbacking to the 3.1.1 version of this file probably fix the issue.
Regards
Arnaud
PS: I'd try to produce a simple test case in the next days
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: