BaseORMService Error - session is closed

Hi guys,

I did a quick search and came across this thread - http://groups.google.com/group/coldbox/browse_thread/thread/50339b918e5485a8 - regarding the session is closed variable when using BaseORMService. I’ve checked my entities and all are using generator=increment. I also followed some of the tips in the thread, however I’m not able to resolve this error whenever my doSignup() event is fired. Wondering if someone can provide any guidance on how to resolve.

Greatly appreciate the help! Thanks!

ORM settings:

this.ormEnabled = true;
this.datasource = “mydb”;
this.ormSettings = {
dbcreate = “none”,
dialect = “MicrosoftSQLServer”,
logSQL = true,
eventhandling = true,
eventhandler = “model.ORMEventHandler”,
flushAtRequestEnd = false,
cfcLocation=[“model”,"/common/model"],
useDBforMapping=false,
flushatRequestEnd = false,
automanagesession = false
};

User Entity

component persistent=“true” table=“User”{

property name=“userid” fieldtype=“id” ormtype=“integer” type=“integer” generator=“increment”;
property name=“hash” ormtype=“string” type=“string” notnull=“true”;
property name=“fk_accountid” ormtype=“integer” type=“integer” default="";
property name=“firstname” ormtype=“string” type=“string” notnull=“true”;
property name=“lastname” ormtype=“string” type=“string” notnull=“true”;
property name=“email” ormtype=“string” type=“string” notnull=“true”;
property name=“password” ormtype=“string” type=“string” notnull=“true”;
property name=“attributes” fieldtype=“one-to-one” cfc=“Attribute” singularname=“attribute” mappedby=“user”;
property name=“address” fieldtype=“many-to-one” cfc=“Address” fkcolumn=“fk_homeaddressid” missingrowignored=“true”;

User function init() output=false{
return this;
}
}

Signup.cfc Handler

component{

property name=“ORMService” inject=“coldbox:plugin:ORMService”;
property name=“BeanFactory” inject=“coldbox:plugin:BeanFactory”;
property name=“securityService” inject;

// OPTIONAL HANDLER PROPERTIES
this.prehandler_only = “”;
this.prehandler_except = “”;
this.posthandler_only = “”;
this.posthandler_except = “”;
// REST Allowed HTTP Methods Ex: this.allowedMethods = {delete=‘POST,DELETE’,index=‘GET’}
this.allowedMethods = {};

function signup(event){
var rc = event.getCollection();
event.setView(“general/signup”);
}

function doSignup(event){
var rc = event.getCollection();

// popualte a new user object
var rc.user = ORMService.new(“User”);
BeanFactory.populateBean(target=rc.user,include=‘firstname,lastname,email,password,eulaaccepted’);

//dump out the rc
event.setView(“dump”);

}

}