[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2128) data corruption using one-to-one mapping

Patrick Moore (JIRA) noreply at atlassian.com
Tue Oct 3 18:53:24 EDT 2006


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.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list