[ColdBox 3.6.0] MxUnit and module's ORM

I’m trying to setup my mxunit test. I have a simple app with some modules that have their own model with some ORM object.

I’m trying to setup the mxunit, but when I fire a simple test I get an error:

railo.runtime.exp.NativeException: User is not mapped [select count(*) from User]

The user entity is in modules/solitary/model

My Application.cfc in test folder is:

this.mappings["/baseApp"] = expandpath(’…/…/’);
this.mappings[’/solitary’] = this.mappings["/baseApp"] & “modules\solitary”;
//dump(this);abort;
this.ormEnabled = true;
this.datasource = “tropicalseo”;
this.ormSettings = {
cfclocation = [“model”,“solitary/model”],
dialect = “MySQL”,
dbcreate = “update”,
logSQL = true,
flushAtRequestEnd = false,
eventHandling = true,
eventhandler = “model.EventHandler”
};
//dump(this);abort;

Is this railo or cf?

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

entity names are case sensitive.

also, if you specify a datasource in the entity and create a relationship to another w/ a diff datasource, it’ll throw that.

or it cant find the cfc.

double check cfclocation in your application.cfc.

This is railo 4.1

I have seen errors like that when using relative paths on ORM with Railo. Can you try with absolute paths?

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano