Models External Location

Hi - is it possible to have a map to the models directory outside of
the application root? Our existing models are not web accessible:


I've tried following the documentation, but I'm getting an error.



nm was able to do it through the WireBox scanLocations

I actually want to revisit this. Has this functionality been
deprecated? When I assign this setting in the Coldbox.cfc, it's
remains an empty string when I dump the CB settings.

Is there a way to do this without WireBox?



To my knowledge there has never been a models external location.

What specific are you trying to achieve here? What I have done in the past is modify the models location on the fly.

I want to be able to map our existing model (packages) but it lives
outside the application root. I get the following error:

Error Type: BeanFactory.modelNotFoundException : [N/A]
Error Messages: Model Test could not be located.
The model object could not be located in the following locations:
C:\inetpub\wwwroot\coldbox\app\model OR app.modules.forgebox.model
*The location I'm expecting it to scan is C:\inetpub\wwwroot\coldbox\packages\

I thought this would help, but when I added the setting, it does not

I was able to get it to work through the WireBox config using
scanLocations. I suppose I'm just curious now what
modelsExternalLocation does, if anything.



Those sort of things would be best with a mapping as in ColdFusion mapping, so that the convention you use for model is then accessible as ColdFusion knows where to find it.

But it will also mean that all models will be found here, as you can’t have both. I should point out the models and other conventions are very safe and don’t require to be hidden like this, just a FYI for future reference more than anything else.

Now Luis or someone else with better knowledge of WireBox, can pipe in on how this might effect WireBox but I think it should be fine as long as the convention you setup is mapped to the location that is external.

With wirebox objects can exist anywhere as long as you map them. If you want conventions then you would add locations to your scan locations for convention scanning.

Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform:
Linked In:
IECFUG Manager: