[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3744) Improved support for persistence of subclasses

Ben Clark (JIRA) noreply at atlassian.com
Thu Jan 29 12:08:39 EST 2009


Improved support for persistence of subclasses
----------------------------------------------

                 Key: HHH-3744
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3744
             Project: Hibernate Core
          Issue Type: Patch
          Components: envers
         Environment: hibernate-envers-3.4.0-SNAPSHOT, hibernate-core-3.4.0-SNAPSHOT, hibernate-annotations-3.4.0-SNAPSHOT, not hibernate entity manager, hsqldb 1.8.0
            Reporter: Ben Clark
            Priority: Minor
         Attachments: envers-patch.txt

I've been trying to use envers to add auditing functionality to an existing application and found a few minor bugs in the way which it persisted subclasses, and their properties. All were mapped with table-per-class-hierarchy. Also, there were some issues relating to hibernate proxies, where getClass() was returning the name of the enhanced class, not the actual class, or  where session.guessEntityName() returned the name of the (proxied) superclass, not the actual class.

I also ran into a NPE when persisting a subclass where the changes were in collections belonging to the superclass, and another problem with access to private constructors which I think is already flagged as an issue.

I've attached a patch which resolves these issues, but it results in failures in the following tests: testHistoryOfId, testRevisionsCounts

Thanks,
               Ben

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