[hibernate-issues] [Hibernate-JIRA] Assigned: (HHH-6209) Envers: ValidityAuditStrategy should support non-generated PKs
Gail Badner (JIRA)
noreply at atlassian.com
Mon Aug 15 20:58:04 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gail Badner reassigned HHH-6209:
--------------------------------
Assignee: Adam Warski
Adam, please assign as appropriate.
Thanks,
Gail
> Envers: ValidityAuditStrategy should support non-generated PKs
> --------------------------------------------------------------
>
> Key: HHH-6209
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6209
> Project: Hibernate Core
> Issue Type: Improvement
> Components: envers
> Affects Versions: 3.6.3
> Reporter: Nikita D
> Assignee: Adam Warski
>
> I have an entity for storing String key-value pairs (the equivalent of a properties file). The String key is the primary key -- it's not generated, and there is no other generated id. It's not possible to use ValidityAuditStrategy for auditing changes to this entity. The problem is when a row is deleted and later another row is inserted with the same key as the deleted one.
>
> When a row is deleted, a revision of type DEL is added, with the REVEND column set to null. When a row is added with the same PK, a revision of type ADD is added, with the REVEND column set to null. A subsequent call to update the row fails, because ValidityAuditStrategy expects to find exactly one row with a null REVEND value, but at this point there are 2 rows.
> The ADD revision should update the REVEND column of the DEL revision, or the DEL revision can set rev = revend = revision at which the del happened.
> See http://community.jboss.org/message/594167.
--
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