-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: fix for HHH-8171 has broken ValidityAuditStrategy
PostPosted: Sun Sep 22, 2013 10:04 am 
Newbie

Joined: Sun Sep 22, 2013 9:52 am
Posts: 1
Hi,

The fix for HHH-8171, which involved adding a 'ordinal' column to the revision table of a collection of embeddables has broken the Validity Audit Strategy.

This is because when the strategy queries for the previous revision to update the end revision and optional end timestamp its trying to find the revision using a match on various things including the ordinal column, however the ordinal value that is generated each time an entity is retrieved and saved is not consistent (i.e. the elements in the collection don't always get the same ordinal value) which, given the query to find the previous one tries to use the currently generated ordinal value to find a match, means that the query doest return any rows (unless by fluke the same ordinal value was generated).

Im not sure if simply excluding the ordinal value from the query created in the performCollectionChange method is sufficient to fix the problem or not, someone with more in depth knowledge of envers will need to assist.

This is a regression as before the 8171 'fix' was introduced this worked fine.

Suggested workarounds for this would be greatly appreciated.

Thanks

Chris


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.