[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2128?page=c...
]
Patrick Moore commented on HHH-2128:
------------------------------------
... I should add I spent a hours tying to figure out why my data was completely corrupted.
It was not obvious that the problem was related to the database order of the data!
Concider it a testiment to Hibernate -- that I spent a large amount time assuming that I
had some programming bug :-)
data corruption using one-to-one mapping
----------------------------------------
Key: HHH-2128
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2128
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.2.0.cr4
Environment: hsqldb 1.8.0
Reporter: Patrick Moore
Priority: Blocker
Attachments: hibernatetests.zip
Please notice that this situation arose from the most minimal definition. Using the
'defaults' is what caused this issue!
See attached zip for definitions and reproduction test case.
Steps:
1. define two classes (Primary, Secondary) that have a one-to-one relationship.
2. save a primary with no assigned secondary object.
3. save another primary with a secondary object.
4. retrieve the first primary and it will have the secondary object saved in step 3.
5. retrieve the second primary and it will have no secondary object.
Suggested solution:
require that 'one-to-one' enforce an implicit non-null requirement between
primary and secondary.
--
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