tag:blogger.com,1999:blog-37642571.post8433795840174847320..comments2024-03-20T02:30:44.457-07:00Comments on Thinking In Software: Auditing entities with Hibernate JPANestor Urquizahttp://www.blogger.com/profile/12351754666722274569noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-37642571.post-76468546023941044782017-05-05T06:56:09.982-07:002017-05-05T06:56:09.982-07:00@madsammy4u that would be a question for the hiber...@madsammy4u that would be a question for the hibernate team but certainly the source code could be inspected to find out the "how".Nestor Urquizahttps://www.blogger.com/profile/12351754666722274569noreply@blogger.comtag:blogger.com,1999:blog-37642571.post-27231023432180188002017-05-04T23:05:08.905-07:002017-05-04T23:05:08.905-07:00I'm still confused how custom_revision_entity ...I'm still confused how <b>custom_revision_entity</b> table will be created, how will hibernate get to know that it has to create this table.madsammy4uhttps://www.blogger.com/profile/14183851889769623975noreply@blogger.comtag:blogger.com,1999:blog-37642571.post-73913761934688944312015-02-24T06:05:16.561-08:002015-02-24T06:05:16.561-08:00@Descorpicus you should be able to find a solutio...@Descorpicus you should be able to find a solution with embers queries. See http://docs.jboss.org/envers/docs/index.html#queriesNestor Urquizahttps://www.blogger.com/profile/12351754666722274569noreply@blogger.comtag:blogger.com,1999:blog-37642571.post-46934796664749088332015-02-23T13:56:13.847-08:002015-02-23T13:56:13.847-08:00Is there way I show the old and new value of a fie...Is there way I show the old and new value of a field that has changed?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-37642571.post-54860900292682775212015-02-23T13:55:27.852-08:002015-02-23T13:55:27.852-08:00I'm trying to achieve a feature to show the ol...I'm trying to achieve a feature to show the old and new value on the UI. Is it possible?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-37642571.post-17194453064326323912014-05-21T17:42:54.759-07:002014-05-21T17:42:54.759-07:00@Amit, my pleasure.@Amit, my pleasure.Nestor Urquizahttps://www.blogger.com/profile/12351754666722274569noreply@blogger.comtag:blogger.com,1999:blog-37642571.post-7772402927729999062014-05-20T06:43:26.451-07:002014-05-20T06:43:26.451-07:00@Nestor Urquiza,thanks a ton,you saved my time@Nestor Urquiza,thanks a ton,you saved my timeAnonymoushttps://www.blogger.com/profile/00884122753573591486noreply@blogger.comtag:blogger.com,1999:blog-37642571.post-5091131361862467192014-05-20T06:32:44.400-07:002014-05-20T06:32:44.400-07:00@Amit, if you read the post you will notice that e...@Amit, if you read the post you will notice that envers will not add the user name by itself. You need to provide a hook like explained. The hook creates a new table that you can join with the audited entity table because every time a change is done it registers the username and the timestamp.<br />Nestor Urquizahttps://www.blogger.com/profile/12351754666722274569noreply@blogger.comtag:blogger.com,1999:blog-37642571.post-53247303768392283602014-05-20T06:24:57.081-07:002014-05-20T06:24:57.081-07:00@Nestor Urquiza,thanks for your quick response
i h...@Nestor Urquiza,thanks for your quick response<br />i have a table 'meeting' in which i didn't take username as a field but when audit table generated from this table i want to add extra column "username" in audit table e.g 'meeting_AUD'. i want to track who performed this action.<br />Means who did what.<br />so is it possible with Envers that we can add extra column because it only track time stamp when this operation performed.<br />please help me out.<br />thanksAnonymoushttps://www.blogger.com/profile/00884122753573591486noreply@blogger.comtag:blogger.com,1999:blog-37642571.post-25675759149603976802014-05-20T06:01:39.796-07:002014-05-20T06:01:39.796-07:00@Amit, you have the username in table custom_revis...@Amit, you have the username in table custom_revision_entity. Nestor Urquizahttps://www.blogger.com/profile/12351754666722274569noreply@blogger.comtag:blogger.com,1999:blog-37642571.post-47246383983756175432014-05-20T01:11:25.196-07:002014-05-20T01:11:25.196-07:00Hi, thank you for the post. It's very helpful....Hi, thank you for the post. It's very helpful.<br />I have a question,can we add extra column in audit table.<br />like i want to track the record of when this task done or who done that.<br />so i want to add extra column in audit table because Envers only add that column which is in mapped class how i achieve this.please help me out<br />Anonymoushttps://www.blogger.com/profile/00884122753573591486noreply@blogger.comtag:blogger.com,1999:blog-37642571.post-27657439174048930822011-08-15T16:11:24.066-07:002011-08-15T16:11:24.066-07:00@SCKing Did you look at the Envers API? I have no ...@SCKing Did you look at the Envers API? I have no experience with that part as so far being able to audit through plain SQL is enough for my user stories.<br /><br />To be able to use annotations to audit and at the same time do other stuff at runtime you will need to hook into the API, I suspect.<br /><br />Good luck!<br />-NestorNestor Urquizahttps://www.blogger.com/profile/12351754666722274569noreply@blogger.comtag:blogger.com,1999:blog-37642571.post-7154809902283199822011-08-12T04:51:24.515-07:002011-08-12T04:51:24.515-07:00Hi, thank you for the post. It's very helpful....Hi, thank you for the post. It's very helpful.<br />I have a question, is it possible to get the rev id right after updating the data (run-time)? For example, after invoking the method that updates the home_email, how to get the rev id 1?<br />Thanks in advance.Anonymoushttps://www.blogger.com/profile/11517159425188414404noreply@blogger.comtag:blogger.com,1999:blog-37642571.post-80560691792513154562011-06-07T04:45:02.617-07:002011-06-07T04:45:02.617-07:00Very clear explanation! Thanks!Very clear explanation! Thanks!Jeffreyhttps://www.blogger.com/profile/06799781638976479304noreply@blogger.com