[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5411) Missing value in not updatable column in Envers audit table

Laurent Grangier (JIRA) noreply at atlassian.com
Mon Jul 26 07:39:35 EDT 2010


Missing value in not updatable column in Envers audit table
-----------------------------------------------------------

                 Key: HHH-5411
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5411
             Project: Hibernate Core
          Issue Type: Bug
          Components: envers
    Affects Versions: 3.3.0.GA
         Environment: Hibernate 3.4
            Reporter: Laurent Grangier


When I update an entity with a property which is updatable=false and that the property is not filled when passing the object to Hibernate, the update is correctly made by Hibernate but Envers fill a null value in the given column in the audit table.

Example :
{code}
public class MyEntity {
   private String myString;
   @Column(updatable = false)
   private Long myLong;

   (...)
}

MyEntity entity = new MyEntity();
entity.setMyString("example");
entity.setMyLong(123L);
entityManager.persist(entity);
Long entityId = entity.getId();

(...)

MyEntity entity = new MyEntity();
entity.setId(entityId);
entity.setMyString("new value");
entityManager.persist(entity); // Here Envers miss to fill the column myLong in the audit table !
{code}

In the above example, in the audit table, the value of "myLong" will be "null" but I expected "123" instead.


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