[coldbox:15879] getAppMapping and a root site

If you are just dealing with WireBox mappings, just change the scan location. Your scan location is essentially your convention for where your models are located, and WireBox uses it as the base path for locating models. You can also have multiple scan locations.

If you like doing mapping with mapDirectory(), mapPath(), or map().to() then you can create a ColdFusion mapping for myModelLocation and start all model paths with that. Then you can update the mapping if the models move.


A third alternative (more along the lines of what you were trying to do), would be to build your prefix string ahead of time with something like this:

if (appMapping == ‘’)
prefix = ‘’;
prefix = appMapping & ‘.’;




perfect suggestions…thanks.

I like the “cleanliness” of mapping methods but have seen suggestions to the contrary.