ORMEventHanlder Property Injection Error

Skip to first unread message

Matthew Darby

Aug 2, 2016, 3:58:18 PM8/2/16
to coldspri...@googlegroups.com
I am receiving the following error when attempting to save an ORM entity in ColdBox 3.8.1.
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
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 = ""
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?

Matthew Darby

Aug 2, 2016, 6:12:32 PM8/2/16
to coldspri...@googlegroups.com
I apologize, I posted this to the wrong forum.
Reply all
Reply to author
0 new messages