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

Adam Warski (JIRA) noreply at atlassian.com
Fri Jan 30 07:00:38 EST 2009


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

Adam Warski resolved HHH-3744.
------------------------------

         Assignee: Adam Warski
       Resolution: Fixed
    Fix Version/s: 3.4

Hello,

I applied the patch, except in PersistentCollectionChangeWorkUnit, I didn't change:

referencingPropertyName = role.substring(entityName.length() + 1);

to:

referencingPropertyName = role.substring(role.lastIndexOf(".") + 1);

as it was causing the tests to fail.

Thanks for the fixes! :)

> 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
>            Assignee: Adam Warski
>            Priority: Minor
>             Fix For: 3.4
>
>         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