We are using ColdBox for three separate applications now that share a
lot in common (like the entire business layer and data layer) so we
have been sharing as much as possible between the apps. (javascript,
view, and handlers where appropriate) We are using the same model for
all the apps and have employed the ModelsExternalLocation setting to
help with that. Every change to our model though means I still have
to update all three of my modelMappings.cfm files to match.
While I understand it would be possbile to share the same model
between the apps and map them to entirely different names I can't
think of any really good reason to torture muyself like that right
off.
Therefore I'd like to suggest a ModelMappingExternalLocation setting.
looking through the beanFactory plugin I see that it uses
getSetting("ApplicationPath") & "config/modelMappings.cfm"
to find the model mappings. It should be rather simple to add a fall
back so if that location isn't found, it would resort to an external
location instead.
Now, that approach would require ALL of the model mappings to be
duplicated locally even if only differed from the external location.
Overriding specific mappings sounds like a bit more of a pain, so I
would be just happy with the simple solution.
Thoughts?
~Brad