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

Gail Badner (JIRA) noreply at atlassian.com
Thu Feb 8 14:31:40 EST 2007


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2350?page=all ]

Gail Badner updated HHH-2350:
-----------------------------

    Attachment: testcase-xml-mapping.tgz

 I have reproduced this issue using Hibernate mapping files. I've attached testcase-xml-mapping.tgz containing the new test case with the relevant mappings and Java classes.

This test case did not fit neatly into any of the (non-annotations) test packages, so the test was put in org.hibernate.bugs.cache and the test was renamed to RecursiveBidirectionalOneToManyTest.

There are two test methods in RecursiveBidirectionalOneToManyTest, testOneToMany() which uses a second-level cache and testOneToManyNoCache() that does not use caching; testOneToMany() fails and testOneToManyNoCache() succeeds.

Gail Badner
SourceLabs - http://www.sourcelabs.com
Dependable Open Source Systems

> 2nd level cache broken for inverse bidirectional one-to-many relation
> ---------------------------------------------------------------------
>
>          Key: HHH-2350
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2350
>      Project: Hibernate3
>         Type: Bug

>   Components: core
>     Versions: 3.2.1
>  Environment: Database: MySQL, HSQL, ... (seems not to be important)
>     Reporter: Burkhard Graves
>  Attachments: testcase-xml-mapping.tgz, testcase.tgz
>
>
> When using "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