[coldbox-3.5.3] App consolidation with multiple datasources advice

I’m working on a project that is consolidating multiple applications into a single interface.

I plan on implementing each of the previous applications as a module and have that partially up and running. Many of the modules share a common datasource but a couple of them do not.

We use CF admin to define the datasources.

I have the ORM entities that are shared between the modules defined in the models/entities fold and was hoping to setup the entities that are specific to the other modules and that using a different datasource in the modules/module_name/model/entities folder.

Is this possible? or is there a better solution.

My goals is to be able to move the application between dev, test, and production environments and only have to change the datasource in one location since we have dev, test, and production datasources.

This consolidation will also allow me to be able to manage the users of all applications/modules from one location.

Thank you for any suggestions,
Aaron

Entities will inherit the datasource name set in the application.cfc.

You can override that datasource by setting the datasource property in the entity. Careful when using a mix of inherited datasource entities and hardcoded ones when it comes to associations from one entity to others. They dont play well together.

Thanks.

The interdependence between entities should not be a problem with this application.

I was no hoping there was another way besides setting the value in the property. If I were to set the datasource in the property then I would have to go through all of the entities and change the datasource each time I move the files between environments.

I was hoping there was a config file or injector setting that I could use.

Aaron W.