Hi,
I’m following the CommandBox instructions for the “coldbox create orm-crud” command posted at the link below and I’m getting a path error returned. I’m hoping someone can tell me what I’m doing wrong or if this feature is implemented (I’ve noticed some commandbox featured are documented but not implement yet). I’ve search the google groups and stackoverflow for this error and came up with nothing useful.
Link to doc instructions:
http://coldbox.ortusbooks.com/content/models/coding_scaffolding/scaffold.html
First I created the model using this syntax. It worked fine and created the model.organization component (note: the ‘…’ is the other fields excluded for brevity).
coldbox create orm-entity entityName=organization table=organizations primaryKey=myID properties=col1:STRING,col2:STRING,...
Next I ran this command to create the scaffold files
coldbox create orm-crud models.Organization
Commandbox returned the following error :
ERROR: invalid component definition, can't find component [C:/apps/myapp/models/Organization]
I check the spelling and syntax of the model.organization component and looks okay to me.
`
/**
- A cool organization entity
*/
component persistent=“true” table=“organizations” {
// Primary Key
property name=“MyID” fieldtype=“id” column=“MyID” generator=“native” setter=“false”;
// Properties
property name=“Col2” ormtype=“STRING”;
property name=“Col3” ormtype=“STRING”;
…
// Validation
this.constraints = {
Col2 = { required=true }
};
// Constructor
function init(){
super.init( useQueryCaching=“false” );
return this;
}
}
`
App running on Windows 8.1, Lucee 4.5.1.008 final (installed from Commandbox), MySQL 5.6, modules installed: cbmessagebox, cbdebugger, cborm, cbi18n, cbvalidation.
Note: Since I found another post with a similar ORM question (for ColdBox, not Commandbox) it’s worth mentioning I have added the following line to my c:/apps/myapp/Application.cfc file as instructed by the docs:
this.mappings[ "/cborm" ] = COLDBOX_APP_ROOT_PATH & "modules/cborm";
I’ve also used the Virtual Service Layer commands in commandbox successfully. No pathway issues.
Thanks,
D.
PS Commandbox is very sweet tool. Kudos to the folks who developed.