ORM settings:
this.ormEnabled = true;
this.datasource = "MYDSN";
this.ormSettings = {useDBForMapping = true,dialect =
"MicrosoftSQLServer", logSQL = true};
entity:
component accessors=true table="mytest" entityname="test"
persistent=true{
property name="ID" fieldtype="id" generator="identity" setter=false;
public test function init(){return this;}
}
entity service:
component singleton=true accessors=true
extends="coldbox_3_1.system.orm.hibernate.VirtualEntityService"{
public testservice function init()
{super.init(entityName="test");return this;}
}
model mapping:
addModelMapping(alias="testService",path="test.testService");
my tests:
<cfdump var="#getModel("testService")#"> = dumps the VES w/ all the
methods. can return queries. all looks good.
<cfdump var="#new model.test.Test()#"> = dumps the entity. all looks
good.
<cfdump var="#getModel("testService").new()#"> = gives the error
"Could not find the ColdFusion component or interface Test. Ensure
that the name is correct and that the component or interface exists."
it seems that hibernate cant find the entity cause its using a short
name? although, hibernate seems to know where the entity lives
because it does create the table "mytest".