When you declare a module and you define a
models folder then the framework automatically register all models in that folder for you using a namespace of
@moduleName. This means that all models are registered according to their CFC name plus the namespace.
Info Internally, ColdBox uses WireBox's
mapDirectory()to map the entire
modelsdirectory for you.
Let's say you have a module called
store and a
OrderService.cfc inside of the
models folder. That object will have a WireBox id of
property name="orderService" inject="[email protected]";
Hint You can alter this behavior by setting the
this.autoMapModelsconfiguration setting to false. You can also alter the namespace used via the