Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: Grails-AuditLogging 0.5
-
Component/s: None
-
Labels:None
-
Environment:PostgreSQL and Oracle
-
Patch Submitted:Yes
Description
Attached is a patch that provides a workaround for problems discussed on the Grails mailing list http://www.nabble.com/Audit-Logging-Plugin-Question-td17430121.html and http://www.nabble.com/how-do-I-encrypt-a-password--td17130128.html#a17170904 with the Audit Log plugin. The plugin successfully creates rows in the Audit Log table when using the in memory database, but fails silently with at least two 'real' databases (postgres and oracle).
Please note that this particular patch will only work with a postgres database. In particular, the SQL statement used in AuditLogListener.saveAuditLog() uses
1) select nextval ('hibernate_sequence') and
2) now()
which may or may not work depending on your database.
I don't think this is the ideal solution, but it may help some people get past the initial issue until a more permanent solution is found.
Attachments
Issue Links
| This issue is related to: | ||||
| GRAILS-6272 | Upgrading to grails 1.3 causes tests to fail due to unique constraint errors |
|
|
|
| This issue is depended upon by: | ||||
| GPAUDITLOGGING-15 | Integration tests with auditable domain class do not observe test transaction boundary |
|
|
|
In the AuditLogEvent domain class I'm testing with the following mapping...
static mapping = { table 'audit_log' id generator:'native' }
... does this work for anyone else (not on MySQL)?