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

Christian Bauer (JIRA) noreply at atlassian.com
Tue Oct 3 19:03:24 EDT 2006


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2128?page=comments#action_24695 ] 

Christian Bauer commented on HHH-2128:
--------------------------------------

The only valid mapping in your tests is the second mapping. You obviously can't use a shared primary key one-to-one mapping with automatically assigned native primary keys. Re-submit this test with only valid mappings (or one mapping that is valid).


> 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