[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-2350) 2nd level cache broken for non-inverse bidirectional one-to-many relation

Gail Badner (JIRA) noreply at atlassian.com
Thu Jul 22 16:01:35 EDT 2010


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gail Badner resolved HHH-2350.
------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 3.6.x)
                   3.6.0.Beta2

Fixed in Branch_3_5 and trunk.

This was fixed by changing ManyToOneType.isAlwaysDirtyChecked() to return true.

If an entity has only its "inverse" many-to-one association that is dirty, its version will be incremented. This was not being done before this fix.


> 2nd level cache broken for non-inverse bidirectional one-to-many relation
> -------------------------------------------------------------------------
>
>                 Key: HHH-2350
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2350
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: caching (L2)
>    Affects Versions: 3.2.1, 3.5.0-CR-2
>         Environment: Database: MySQL, HSQL, ... (seems not to be important)
>            Reporter: Burkhard Graves
>            Assignee: Gail Badner
>             Fix For: 3.6.0.Beta2, 3.5.x
>
>         Attachments: testcase-xml-mapping.tgz, testcase.tgz
>
>
> When using "non-inverse" one-to-many relations as described in  "2.4.6.2.3. Bidirectional association with indexed collections" (http://www.hibernate.org/hib_docs/annotations/reference/en/html/entity.html#entity-hibspec-collection-extratype) hibernate is wrong when activating 2nd level cache.
> See the attached example (unzip in /usr/local/hibernate-annotations-3.2.1.GA, testname=org.hibernate.test.annotations.invonetomany.InverseOneToManyTest).
> More details can be found here: http://forum.hibernate.org/viewtopic.php?t=969456 (and also in InverseOneToManyTest.java).

-- 
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