@@ -334,8 +334,8 @@ component extends="coldbox.system.web.services.BaseService" accessors="true" {
334334 autoProcessModels : false ,
335335 // Does the module belong to a bundle or not
336336 bundle : arguments .bundle ,
337- // ColdFusion mapping
338- cfmapping : " " ,
337+ // Engine mapping
338+ mapping : " " ,
339339 // Child modules
340340 childModules : [],
341341 // Module Conventions
@@ -480,11 +480,10 @@ component extends="coldbox.system.web.services.BaseService" accessors="true" {
480480 mConfig .schedulerInvocationPath & = " .#mConfig .conventions .schedulerLocation #" ;
481481 mConfig .schedulerPhysicalPath & = " /#mConfig .conventions .schedulerLocation .replace ( " ." , " /" , " all" ) #" ;
482482
483- // Register CFML Mapping if it exists, for loading purposes
484- // TODO: If a duplicate mapping is detected, warn it to logs
485- if ( len ( trim ( mConfig .cfMapping ) ) ) {
486- variables .util .addMapping ( name = mConfig .cfMapping , path = mConfig .path );
487- variables .mappingRegistry [ " /#mConfig .cfMapping #" ] = mConfig .path ;
483+ // Register Engine Mapping if it exists, for loading purposes
484+ if ( len ( trim ( mConfig .mapping ) ) ) {
485+ variables .util .addMapping ( name : mConfig .mapping , path : mConfig .path );
486+ variables .mappingRegistry [ " /#mConfig .mapping #" ] = mConfig .path ;
488487 }
489488
490489 // Register Custom Interception Points
@@ -564,7 +563,7 @@ component extends="coldbox.system.web.services.BaseService" accessors="true" {
564563 * Load all module mappings
565564 */
566565 function loadMappings (){
567- variables .util .addMapping ( mappings = variables .mappingRegistry );
566+ variables .util .addMapping ( mappings : variables .mappingRegistry );
568567 return this ;
569568 }
570569
@@ -699,7 +698,7 @@ component extends="coldbox.system.web.services.BaseService" accessors="true" {
699698
700699 // Add as a mapped directory with module name as the namespace with correct mapping path
701700 var packagePath = (
702- len ( mConfig .cfmapping ) ? mConfig .cfmapping & " .#mConfig .conventions .modelsLocation #" : mConfig .modelsInvocationPath
701+ len ( mConfig .mapping ) ? mConfig .mapping & " .#mConfig .conventions .modelsLocation #" : mConfig .modelsInvocationPath
703702 );
704703
705704 // Module Injector : Map with no namespace in the local injector
@@ -1098,7 +1097,7 @@ component extends="coldbox.system.web.services.BaseService" accessors="true" {
10981097 * @parent The parent that invoked the registration
10991098 * @parent The parent injector this module will be linked to
11001099 *
1101- * @return struct : { config:cfc , injector:cfc }
1100+ * @return struct : { config:class , injector:class }
11021101 */
11031102 struct function loadModuleConfiguration (
11041103 required struct config ,
@@ -1147,9 +1146,10 @@ component extends="coldbox.system.web.services.BaseService" accessors="true" {
11471146 // version
11481147 param results .config .version = " 1.0.0" ;
11491148 mConfig .version = results .config .version ;
1150- // cf mapping
1149+ // engine mapping: cfmapping is deprecated but we check for it for backward compatibility
11511150 param results .config .cfmapping = " " ;
1152- mConfig .cfmapping = results .config .cfmapping ;
1151+ param results .config .mapping = " " ;
1152+ mConfig .mapping = len ( results .config .mapping ) ? results .config .mapping : results .config .cfmapping ;
11531153 // Module Injector
11541154 param results .config .moduleInjector = false ;
11551155 mConfig .moduleInjector = results .config .moduleInjector ;
0 commit comments