grails-audit-logging-plugin
grails-audit-logging-plugin copied to clipboard
getAuditDomainClass() method not found.
With fix for #189 we moved static methods from AuditLogListenerUtil to AuditLogListener instance. We forgot to fix the AuditLogEventController...
Thanks to David Brown for bringing that up (via Slack)
Re-introducing a method in AuditLogListenerUtil seems not to be the right thing to do. The AuditLogEventController in general got the problem with audit domain class type definition, which is evaluated during runtime. For this, @Transactional does not work, as we do not know which datasource the AuditTrail domain class is bound to.
What would work is using <AuditTrailClass>.withTransaction{} wrapping, which makes the code ugly and also lead to wierd other problems (AuditTrail cannot be cast to AuditTrail)
I tend to remove the AuditLogEventController completely from the plugin and add a reference in the docs to the test AuditTrailsController (which also needs rework a bit)
Working on Grails script to generate the Controller from template in users project.