Status/Resolution/Reason: Closed/Won't Fix/LowImpact
Reporter/Name(from Bugbase): Andrew Scott / Andrew Scott (Andrew Scott)
Created: 03/14/2012
Components: ORM Support
Versions: 10.0
Failure Type:
Found In Build/Fixed In Build: Public Beta /
Priority/Frequency: Major / Most users will encounter
Locale/System: English / Windows 7
Vote Count: 0
Problem Description:
I wanted to try this again and get you to understand how important this error is.
Currently I am trying to find a way to write audit logs for my entities, and have been trying to find a way for this using entities for now 4 years.
I will give you the basic code, but rest assured that this is also being checked to see if that entity has called the event if so then don't run the code. But for now I just want to give you a basic concept of the problem.
So lets say we have an event handler.
public void function postInsert(any entity) {
var domain = new domains.audit(auditDateTime: now(), template: #getMetaData( entity ).fullname#, detail: 'This is a test of strength', ipAddress: cgi.http_host);
entitySave(domain);
}
Now remember that this is an example, the actual code will check to see if the even being run is the audit so we don't end up in some serious loop.
As it stands now there is no way to be able to do this, and it will throw a session closed error. All the standard Java techniques don't seem to work because there is no way to open a new session for that entity to be created and saved.
This is also a major issue that as annoyed me for 4 years and I am at a loss, a big loss as how to implement something like this. When you code for anyone who has ISO certifications this is a must that audit logs take place on data that has changed.
So I am in need of a solution here, but I am not sure the client will even pay for an upgrade to ColdFusion 10. So I may just have to go and right this in Grails where I am able to achieve this with no issues.
Steps to Reproduce:
Actual Result:
Expected Result:
Any Workarounds:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3138032
External Customer Info:
External Company:
External Customer Name: ascott67
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: