Error Type: Application : [N/A]
Error Messages: coldfusion.runtime.UndefinedVariableException: Variable SESSIONSTORAGE is undefined.
Root cause :org.hibernate.HibernateException: coldfusion.runtime.UndefinedVariableException: Variable SESSIONSTORAGE is undefined.
Here is my configuration.
ORM settings
// ORM Settings
this.ormEnabled = true;
this.datasource = appName;
this.ormSettings = {
cfclocation = ['/models/orm'],
dbcreate = "none",
dialect = "MicrosoftSQLServer",
logSQL = true,
flushAtRequestEnd = true,
autoManageSession = false,
eventHandling = true,
eventHandler = "orm.ORMEventHandler",
savemapping = false
};
Coldbox.cfc
orm = {
injection = {
// enable entity injection
enabled = true,
// a list of entity names to include in the injections
include = "",
// a list of entity names to exclude from injection
exclude = ""
}
};
ORMEventHandler.cfc
component extends="coldbox.system.orm.hibernate.EventHandler" {
property name="SessionStorage" inject="coldbox:plugin:SessionStorage";
...
public void function preInsert(any entity) {
var currentTime = now();
var user = SessionStorage.getVar('user');
When I dump out the properties of this inside ORMEventHandler, I don't see any of the properties being loaded. Is there something I am missing? Should I be able to inject properties into ORMEventHandler? Or is there another way for me to utilize the SessionStorage object inside ORMEventHandler?