-
1. Re: Identify which columns have changed
adamw Mar 18, 2009 8:51 AM (in response to kashmr)Hello,
it's possible in a way :). What you need to do, is first to create a revisions-of-entity query to grab the history of an entity, along with the meta-data. You can also narrow it to return only entities between some revisions, for example.
Then, when you have that list, you can simply compare each entity and the next one to see which fields changed.
--
Adam -
2. Re: Identify which columns have changed
kashmr Mar 18, 2009 6:55 PM (in response to kashmr)Hi,
So you are saying that the only way is comparing each revisionEntity of the next?
And this comparison can only be done using Java?
Thanks
Marcos -
3. Re: Identify which columns have changed
adamw Mar 19, 2009 2:23 AM (in response to kashmr)Hello,
yes, I think so ... there's no possibility to easily compare a database row with the "next revision". So the comparision would have to be done in Java.
Adam -
4. Re: Identify which columns have changed
agorski Mar 19, 2009 9:14 AM (in response to kashmr)Hello,
an utility class which compares / give a list of changes would be expected solution. In other case almost all of the envers clients must write own implementation of such tool -> common solution is much better, I think.
regards
Albert -
5. Re: Identify which columns have changed
adamw Mar 19, 2009 1:22 PM (in response to kashmr)Agreed :). If somebody could contribute such code, that would be great.
Adam -
6. Re: Identify which columns have changed
ax123man May 28, 2009 12:11 PM (in response to kashmr)has anyone out there made progress on this functionality? I'm wondering if they could post a bit on what their approach was. How do you generically iterate/compare properties? How do you define which associated entities are "part of" the comparisons. Is there any code, or even patterns in the envers code that can be leveraged (other than querying for the revisions).