-->
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: Hibernate Enverse - Getting previous version
PostPosted: Tue May 03, 2016 5:28 am 
Newbie

Joined: Tue Apr 19, 2016 6:24 am
Posts: 5
Hi,

I am using hibernate-enverse for auditing purpose. In my requirement, i need to fetch the current object and the previous version of it and compare it.
For comparison purpose, i am converting the object into json and working on it.
In order to get the previous revision of the object, i am fetching the previous version of the object from AuditReader and merging it with the entityManager.
Then fetching the object again.

This is ok for having lesser number of objects but i have got a hierarchy of objects nested to this main object.

In order to fulfill this requirement, i am fetching all the changes for the particular version and merging it in the entityManager and then fetching at the highest level using the key of the top-level object.

This is really a dirty way for doing such things.

Is there any other way possible which enables us to get the previous versions of the objects without merging all the changes.

Any lead will be helpful.

Thanking in advance,
Keshavendra P S


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.