I have a fresh copy of ColdBox. Everything appears to be mapped and works correctly except the ORM service.
To troubleshoot, I recreated the setup used in the Udemy course: https://www.udemy.com/coldbox-platform-developer-week-2013/#/lecture/433052
I have a Contacts database with a Contact table.
I placed this code int he Application.cfc:
// Mappings //this.mappings["/"] = COLDBOX_APP_ROOT_PATH;// ORM Settings
this.ormEnabled = true;
this.datasource = “contacts”;
this.ormSettings = {
cfclocation = “models”,
dialect = “MySQL”,
dbcreate = “update”,
logSQL = true,
flushAtRequestEnd = false,
autoManageSession = false,
eventHandling = true
};
I created an ORM entity:
/**
- A cool Contact entity
*/
component persistent=“true” table=“contact”{
// Primary Key
property name=“id” fieldtype=“id” column=“id” generator=“native” setter=“false” ;
// Properties
property name=“firstname” ormtype=“string”;
property name=“lastname” ormtype=“string”;
property name=“email” ormtype=“string” ;
// Validation
this.constraints = {
// Example: age = { required=true, min=“18”, type=“numeric” }
};
// Constructor
function init(){
return this;
}
}
Then I used the Created CRUD feature within CFBuilder. When I reinit and load the contacts index page I receive this error:
Type: Builder.DSLDependencyNotFoundException
Messages: The DSL Definition {JAVACAST={null},NAME={ormService},ARGNAME={},DSL={entityService:Contact},VALUE={null},SCOPE={variables},REQUIRED={true},REF={null},TYPE={any}} did not produce any resulting dependency The target requesting the dependency is: ‘ssdt.handlers.Contacts’