[hibernate-issues] [Hibernate-JIRA] Created: (HHH-6953) Envers: ManyToOne association returns null for audited entities when insertable/updatable=false

Steffen Ryll (JIRA) noreply at atlassian.com
Mon Jan 9 13:24:12 EST 2012


Envers: ManyToOne association returns null for audited entities when insertable/updatable=false
-----------------------------------------------------------------------------------------------

                 Key: HHH-6953
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6953
             Project: Hibernate Core
          Issue Type: Bug
          Components: envers
    Affects Versions: 3.6.9, 4.0.0.Final
         Environment: Hibernate Core/Envers 3.6.9 and 4.0.0.Final, HSQLDB 2.2
            Reporter: Steffen Ryll
         Attachments: envers-one2many-insertupdatefalse-bug_20120109.zip

We found a problem retrieving historical revisions of entities when there is a OneToMany association involved. Going from the one side to the many side always returns null. However, if I load that association through the normal entity manager, it is non-null (correctly).

I have created a tiny test case (see attachment) that demonstrates the effect.
The special twist is that removing the (insertable=false, updatable=false) parameters to the @JoinColumn annotation in Piece.java makes it work. But we do need those two options in our real project and removing them is no option.

I will start looking into the Envers code and try tracking down the reason for that NullPointerException, but wanted to have a bug report created in the first place.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list