{"id":5016,"date":"2012-01-23T13:22:38","date_gmt":"2012-01-23T07:52:38","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=5016"},"modified":"2012-01-23T13:27:39","modified_gmt":"2012-01-23T07:57:39","slug":"extending-audit-logging-plugin-to-track-changes-to-persistent-collections","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\/","title":{"rendered":"Extending Audit Logging Plugin to track changes to Persistent Collections"},"content":{"rendered":"<p style=\"padding-bottom: 10px\">In one of our project we needed to maintain history of domain objects when they are updated. We saw <a href=\"http:\/\/grails.org\/plugin\/audit-logging\" target=\"_blank\">Grails Audit Logging Plugin <\/a> as a good candidate. But later, found that it doesn&#8217;t take care of persistent collections. So with help of my colleague <a href=\"http:\/\/www.tothenew.com\/blog\/author\/vivek\/\" target=\"_blank\">Vivek<\/a> and this <a href=\"http:\/\/stackoverflow.com\/questions\/812364\/how-to-determine-collection-changes-in-a-hibernate-postupdateeventlistener\" target=\"_blank\">Stack Overflow thread<\/a>, we extended this plugin without making it inline, to handle this limitation.<\/p>\n<p style=\"padding-bottom: 10px\">Audit Logging plugin provides a bean named auditLogListener to handle Hibernate events and provide handlers in Grails Domain classes with old values map and new values map. So what we have to do is create a class named CustomAuditLogListener which extends AuditLogListener from the plugin and overrides the onPostUpdate() method. Implemetation for this class is:<\/p>\n<p>[code]<br \/>\nimport org.codehaus.groovy.grails.plugins.orm.auditable.AuditLogListener<br \/>\nimport org.hibernate.collection.PersistentCollection<br \/>\nimport org.hibernate.engine.CollectionEntry<br \/>\nimport org.hibernate.engine.PersistenceContext<br \/>\nimport org.hibernate.event.PostUpdateEvent<\/p>\n<p>class CustomAuditLogListener extends AuditLogListener {<\/p>\n<p>    @Override<br \/>\n    void onPostUpdate(final PostUpdateEvent event) {<br \/>\n        if (isAuditableEntity(event)) {<br \/>\n            log.trace &quot;${event.getClass()} onChange handler has been called&quot;<br \/>\n            onChange(event)<br \/>\n        }<br \/>\n    }<\/p>\n<p>    private void onChange(final PostUpdateEvent event) {<br \/>\n        def entity = event.getEntity()<br \/>\n        String entityName = entity.getClass().getName()<br \/>\n        def entityId = event.getId()<\/p>\n<p>        \/\/ object arrays representing the old and new state<br \/>\n        def oldState = event.getOldState()<br \/>\n        def newState = event.getState()<\/p>\n<p>        List&lt;String&gt; propertyNames = event.getPersister().getPropertyNames()<br \/>\n        Map oldMap = [:]<br \/>\n        Map newMap = [:]<\/p>\n<p>        if (propertyNames) {<br \/>\n            for (int index = 0; index &lt; newState.length; index++) {<br \/>\n                if (propertyNames[index]) {<br \/>\n                    if (oldState) {<br \/>\n                        populateOldStateMap(oldState, oldMap, propertyNames[index], index)<br \/>\n                    }<br \/>\n                    if (newState) {<br \/>\n                        newMap[propertyNames[index]] = newState[index]<br \/>\n                    }<br \/>\n                }<br \/>\n            }<br \/>\n        }<\/p>\n<p>        if (!significantChange(entity, oldMap, newMap)) {<br \/>\n            return<br \/>\n        }<\/p>\n<p>        \/\/ allow user&#8217;s to over-ride whether you do auditing for them.<br \/>\n        if (!callHandlersOnly(event.getEntity())) {<br \/>\n            logChanges(newMap, oldMap, event, entityId, &#8216;UPDATE&#8217;, entityName)<br \/>\n        }<br \/>\n         executeHandler(event, &#8216;onChange&#8217;, oldMap, newMap)<br \/>\n        return<br \/>\n    }<\/p>\n<p>    private populateOldStateMap(def oldState, Map oldMap, String keyName, index) {<br \/>\n        def oldPropertyState = oldState[index]<br \/>\n        if (oldPropertyState instanceof PersistentCollection) {<br \/>\n            PersistentCollection pc = (PersistentCollection) oldPropertyState;<br \/>\n            PersistenceContext context = sessionFactory.getCurrentSession().getPersistenceContext();<br \/>\n            CollectionEntry entry = context.getCollectionEntry(pc);<br \/>\n            Object snapshot = entry.getSnapshot();<br \/>\n            if (pc instanceof List) {<br \/>\n                oldMap[keyName] = Collections.unmodifiableList((List) snapshot);<br \/>\n            }<br \/>\n            else if (pc instanceof Map) {<br \/>\n                oldMap[keyName] = Collections.unmodifiableMap((Map) snapshot);<br \/>\n            }<br \/>\n            else if (pc instanceof Set) {<br \/>\n                \/\/Set snapshot is actually stored as a Map<br \/>\n                Map snapshotMap = (Map) snapshot;<br \/>\n                oldMap[keyName] = Collections.unmodifiableSet(new HashSet(snapshotMap.values()));<br \/>\n            }<br \/>\n            else {<br \/>\n                oldMap[keyName] = pc;<br \/>\n            }<br \/>\n        } else {<br \/>\n            oldMap[keyName] = oldPropertyState<br \/>\n        }<br \/>\n    }<br \/>\n}<br \/>\n[\/code]<\/p>\n<p style=\"padding-bottom: 10px\">Now we need to register CustomAuditLogListener class as implementation for auditLogListener which will be done in resources.groovy. The bean has to be defined in resources.groovy as:<\/p>\n<p>[code]<br \/>\n auditLogListener(CustomAuditLogListener) {<br \/>\n        sessionFactory   = ref(&#8216;sessionFactory&#8217;)<br \/>\n        verbose          = application.config?.auditLog?.verbose?:false<br \/>\n        transactional    = application.config?.auditLog?.transactional?:false<br \/>\n        sessionAttribute = application.config?.auditLog?.sessionAttribute?:&quot;&quot;<br \/>\n        actorKey         = application.config?.auditLog?.actorKey?:&quot;&quot;<br \/>\n    }<br \/>\n[\/code]<\/p>\n<p style=\"padding-bottom: 10px\">Now we will be able to fetch older values for persistent collections in onChange handler as <a href=\"http:\/\/grails.org\/plugin\/audit-logging\" target=\"_blank\">documented in plugin documentation.<\/a><\/p>\n<p style=\"padding-bottom: 10px\">Hope you find this helpful.<\/p>\n<p>Ankur Tripathi<br \/>\nankur@intelligrape.com<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In one of our project we needed to maintain history of domain objects when they are updated. We saw Grails Audit Logging Plugin as a good candidate. But later, found that it doesn&#8217;t take care of persistent collections. So with help of my colleague Vivek and this Stack Overflow thread, we extended this plugin without [&hellip;]<\/p>\n","protected":false},"author":24,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":24,"footnotes":""},"categories":[7],"tags":[751],"class_list":["post-5016","post","type-post","status-publish","format-standard","hentry","category-grails","tag-audit-logging"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"In one of our project we needed to maintain history of domain objects when they are updated. We saw Grails Audit Logging Plugin as a good candidate. But later, found that it doesn&#039;t take care of persistent collections. So with help of my colleague Vivek and this Stack Overflow thread, we extended this plugin without\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Ankur Tripathi\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.tothenew.com\/blog\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Extending Audit Logging Plugin to track changes to Persistent Collections | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"In one of our project we needed to maintain history of domain objects when they are updated. We saw Grails Audit Logging Plugin as a good candidate. But later, found that it doesn&#039;t take care of persistent collections. So with help of my colleague Vivek and this Stack Overflow thread, we extended this plugin without\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.tothenew.com\/blog\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Extending Audit Logging Plugin to track changes to Persistent Collections | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"In one of our project we needed to maintain history of domain objects when they are updated. We saw Grails Audit Logging Plugin as a good candidate. But later, found that it doesn&#039;t take care of persistent collections. So with help of my colleague Vivek and this Stack Overflow thread, we extended this plugin without\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\\\/#article\",\"name\":\"Extending Audit Logging Plugin to track changes to Persistent Collections | TO THE NEW Blog\",\"headline\":\"Extending Audit Logging Plugin to track changes to Persistent Collections\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/ankur\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2012-01-23T13:22:38+05:30\",\"dateModified\":\"2012-01-23T13:27:39+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":2,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\\\/#webpage\"},\"articleSection\":\"Grails, Audit Logging\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"position\":2,\"name\":\"Grails\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\\\/#listItem\",\"name\":\"Extending Audit Logging Plugin to track changes to Persistent Collections\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\\\/#listItem\",\"position\":3,\"name\":\"Extending Audit Logging Plugin to track changes to Persistent Collections\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/ankur\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/ankur\\\/\",\"name\":\"Ankur Tripathi\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8b8c0eb9da66a345ed47bf81341f412d049fe908967afb77a5c35ac2b03fdba0?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Ankur Tripathi\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\\\/\",\"name\":\"Extending Audit Logging Plugin to track changes to Persistent Collections | TO THE NEW Blog\",\"description\":\"In one of our project we needed to maintain history of domain objects when they are updated. We saw Grails Audit Logging Plugin as a good candidate. But later, found that it doesn't take care of persistent collections. So with help of my colleague Vivek and this Stack Overflow thread, we extended this plugin without\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/ankur\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/ankur\\\/#author\"},\"datePublished\":\"2012-01-23T13:22:38+05:30\",\"dateModified\":\"2012-01-23T13:27:39+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Extending Audit Logging Plugin to track changes to Persistent Collections | TO THE NEW Blog","description":"In one of our project we needed to maintain history of domain objects when they are updated. We saw Grails Audit Logging Plugin as a good candidate. But later, found that it doesn't take care of persistent collections. So with help of my colleague Vivek and this Stack Overflow thread, we extended this plugin without","canonical_url":"https:\/\/www.tothenew.com\/blog\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tothenew.com\/blog\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\/#article","name":"Extending Audit Logging Plugin to track changes to Persistent Collections | TO THE NEW Blog","headline":"Extending Audit Logging Plugin to track changes to Persistent Collections","author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/ankur\/#author"},"publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"},"datePublished":"2012-01-23T13:22:38+05:30","dateModified":"2012-01-23T13:27:39+05:30","inLanguage":"en-US","commentCount":2,"mainEntityOfPage":{"@id":"https:\/\/www.tothenew.com\/blog\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\/#webpage"},"isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\/#webpage"},"articleSection":"Grails, Audit Logging"},{"@type":"BreadcrumbList","@id":"https:\/\/www.tothenew.com\/blog\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.tothenew.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/grails\/#listItem","name":"Grails"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/grails\/#listItem","position":2,"name":"Grails","item":"https:\/\/www.tothenew.com\/blog\/category\/grails\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\/#listItem","name":"Extending Audit Logging Plugin to track changes to Persistent Collections"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\/#listItem","position":3,"name":"Extending Audit Logging Plugin to track changes to Persistent Collections","previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/grails\/#listItem","name":"Grails"}}]},{"@type":"Organization","@id":"https:\/\/www.tothenew.com\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/www.tothenew.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.tothenew.com\/blog\/author\/ankur\/#author","url":"https:\/\/www.tothenew.com\/blog\/author\/ankur\/","name":"Ankur Tripathi","image":{"@type":"ImageObject","@id":"https:\/\/www.tothenew.com\/blog\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/8b8c0eb9da66a345ed47bf81341f412d049fe908967afb77a5c35ac2b03fdba0?s=96&d=mm&r=g","width":96,"height":96,"caption":"Ankur Tripathi"}},{"@type":"WebPage","@id":"https:\/\/www.tothenew.com\/blog\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\/#webpage","url":"https:\/\/www.tothenew.com\/blog\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\/","name":"Extending Audit Logging Plugin to track changes to Persistent Collections | TO THE NEW Blog","description":"In one of our project we needed to maintain history of domain objects when they are updated. We saw Grails Audit Logging Plugin as a good candidate. But later, found that it doesn't take care of persistent collections. So with help of my colleague Vivek and this Stack Overflow thread, we extended this plugin without","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.tothenew.com\/blog\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\/#breadcrumblist"},"author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/ankur\/#author"},"creator":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/ankur\/#author"},"datePublished":"2012-01-23T13:22:38+05:30","dateModified":"2012-01-23T13:27:39+05:30"},{"@type":"WebSite","@id":"https:\/\/www.tothenew.com\/blog\/#website","url":"https:\/\/www.tothenew.com\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Extending Audit Logging Plugin to track changes to Persistent Collections | TO THE NEW Blog","og:description":"In one of our project we needed to maintain history of domain objects when they are updated. We saw Grails Audit Logging Plugin as a good candidate. But later, found that it doesn't take care of persistent collections. So with help of my colleague Vivek and this Stack Overflow thread, we extended this plugin without","og:url":"https:\/\/www.tothenew.com\/blog\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\/","og:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Extending Audit Logging Plugin to track changes to Persistent Collections | TO THE NEW Blog","twitter:description":"In one of our project we needed to maintain history of domain objects when they are updated. We saw Grails Audit Logging Plugin as a good candidate. But later, found that it doesn't take care of persistent collections. So with help of my colleague Vivek and this Stack Overflow thread, we extended this plugin without","twitter:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"5016","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-30 08:11:01","updated":"2024-02-29 10:56:24","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\/category\/grails\/\" title=\"Grails\">Grails<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tExtending Audit Logging Plugin to track changes to Persistent Collections\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.tothenew.com\/blog"},{"label":"Grails","link":"https:\/\/www.tothenew.com\/blog\/category\/grails\/"},{"label":"Extending Audit Logging Plugin to track changes to Persistent Collections","link":"https:\/\/www.tothenew.com\/blog\/extending-audit-logging-plugin-to-track-changes-to-persistent-collections\/"}],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/5016","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=5016"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/5016\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=5016"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=5016"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=5016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}