Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getAuditDomainClass() method not found. #214

Open
robertoschwald opened this issue Feb 11, 2021 · 2 comments
Open

getAuditDomainClass() method not found. #214

robertoschwald opened this issue Feb 11, 2021 · 2 comments

Comments

@robertoschwald
Copy link
Contributor

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)

@robertoschwald
Copy link
Contributor Author

robertoschwald commented Feb 11, 2021

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 .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)

@robertoschwald
Copy link
Contributor Author

Working on Grails script to generate the Controller from template in users project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant