Skip to content

Commit fe6acf9

Browse files
committed
- key [TEMPLATEPATH] doesn't exist when doing orm operations. This was a typo, it should have been templatesPath
1 parent 1432382 commit fe6acf9

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
## [Unreleased]
1111

12+
### Fixed
13+
14+
- key [TEMPLATEPATH] doesn't exist when doing orm operations. This was a typo, it should have been `templatesPath`
15+
1216
## [7.4.0] - 2024-03-20
1317

1418
### Fixed

commands/coldbox/create/orm-crud.cfc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ component extends="coldbox-cli.models.BaseCommand" {
2626
boolean tests = true,
2727
testsDirectory = "tests/specs/integration"
2828
){
29+
2930
// This will make each directory canonical and absolute
3031
arguments.handlersDirectory = resolvePath( arguments.handlersDirectory );
3132
arguments.viewsDirectory = resolvePath( arguments.viewsDirectory );
@@ -71,7 +72,7 @@ component extends="coldbox-cli.models.BaseCommand" {
7172
// ********************** generate handler ************************************//
7273

7374
// Read Handler Content
74-
var hContent = fileRead( "#variables.settings.templatePath#/crud/HandlerContent.txt" );
75+
var hContent = fileRead( "#variables.settings.templatesPath#/crud/HandlerContent.txt" );
7576
// Token replacement
7677
hContent = replaceNoCase(
7778
hContent,
@@ -108,7 +109,7 @@ component extends="coldbox-cli.models.BaseCommand" {
108109
);
109110
var views = [ "edit", "editor", "new" ];
110111
for ( var thisView in views ) {
111-
var vContent = fileRead( "#variables.settings.templatePath#/crud/#thisView#.txt" );
112+
var vContent = fileRead( "#variables.settings.templatesPath#/crud/#thisView#.txt" );
112113
vContent = replaceNoCase(
113114
vContent,
114115
"|entity|",
@@ -132,7 +133,7 @@ component extends="coldbox-cli.models.BaseCommand" {
132133

133134
// Build table output for index
134135
savecontent variable="local.tableData" {
135-
include "#variables.settings.templatePath#/crud/table.cfm";
136+
include "#variables.settings.templatesPath#/crud/table.cfm";
136137
}
137138
tableData = replaceNoCase(
138139
tableData,
@@ -147,7 +148,7 @@ component extends="coldbox-cli.models.BaseCommand" {
147148
"all"
148149
);
149150
// index data
150-
var vContent = fileRead( "#variables.settings.templatePath#/crud/index.txt" );
151+
var vContent = fileRead( "#variables.settings.templatesPath#/crud/index.txt" );
151152
vContent = replaceNoCase(
152153
vContent,
153154
"|entity|",

commands/coldbox/create/orm-event-handler.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ component extends="coldbox-cli.models.BaseCommand" {
3333
arguments.name = replace( arguments.name, ".", "/", "all" );
3434

3535
// Read in Template
36-
var modelContent = fileRead( "#variables.settings.templatePath#/orm/ORMEventHandler.txt" );
36+
var modelContent = fileRead( "#variables.settings.templatesPath#/orm/ORMEventHandler.txt" );
3737
// Write out the model
3838
var modelPath = "#directory#/#arguments.name#.cfc";
3939
// Create dir if it doesn't exist

commands/coldbox/create/orm-virtual-service.cfc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ component extends="coldbox-cli.models.BaseCommand" {
4343
}
4444

4545
// Read in Template
46-
var modelContent = fileRead( "#variables.settings.templatePath#/orm/VirtualEntityService.txt" );
47-
var modelTestContent = fileRead( "#variables.settings.templatePath#/testing/ModelBDDContent.txt" );
46+
var modelContent = fileRead( "#variables.settings.templatesPath#/orm/VirtualEntityService.txt" );
47+
var modelTestContent = fileRead( "#variables.settings.templatesPath#/testing/ModelBDDContent.txt" );
4848

4949
// Query cache Region
5050
if ( !len( arguments.cacheRegion ) ) {

models/BaseCommand.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Base Command Handler
33
*/
4-
component {
4+
component accessors="true" {
55

66
// DI
77
property name="utility" inject="utility@coldbox-cli";

0 commit comments

Comments
 (0)