From: <leg...@at...> - 2003-07-23 14:24:02
|
The following issue has been updated: Updater: Panagiotis Louridas (mailto:plo...@ya...) Date: Wed, 23 Jul 2003 9:23 AM Comment: Thanks for your response Gavin, I am attaching a simple test case illustrating the issue. We have a Currency class and the following hierarchy: BusinessTransaction <- Deal <- DummyDeal. I attach simplified versions of the original classes with just some fields and their associated get/set methods. After saving and committing a Currency and a DummyDeal, if we: (1) query for the DummyDeal (2) perform a change on it (3) perform a query for the Currency we saved before (4) flush and commit the changes to DummyDeal are not persisted in the database. This can be seen in the file DummyDealHibernateTest which is a JUnit test case. It containts a single test, testDummyDeal(). After unpacking the attached tarball: * ant create-db creates the test database. hibernate.properties containts the connection parameters. * ant test -Dtest.case=DummyDealHibernateTest runs the test. In the beginning of build.xml file there are some path properties that I guess should be tweaked somewhat to suit your environment. Changes: Attachment changed to hibernate_report.tar.gz --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-209&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-209 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-209 Summary: FlushMode.AUTO problem in joined subclass hierarchy Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Versions: 2.0.1 Assignee: Reporter: Panagiotis Louridas Created: Tue, 22 Jul 2003 8:09 AM Updated: Wed, 23 Jul 2003 9:23 AM Environment: RedHat Linux 9.0, JVM 1.4.2 Description: Suppose we have a class hierarchy A <- B <- C. In my case the class hierarchy is mapped as a joined-subclass hierarchy, but my observations may hold in general. I use a Session with the default FlushMode setting (FlushMode.AUTO). I open the session, load an object of class B or C, perform some changes on it, do some queries and flush the session. When the session is flushed, only updates for the table pertaining to class A are issued by hibernate. If I manually flush just before the queries hibernate performs fine, issuing the proper updates for tables B and C. The same happens when I manually flush at the end of the transaction, after the queries, but having set the Session's flush mode to FlushMode.NEVER. --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |