I have two Scala projects managed by SBT - models_project
and client_project
.
The models_project
contains the DB models (Slick2-based). This project contains all the Slick tables and rows definitions. The client_project
depends on the models_project
to access the DB.
I want to be able to configure the driver at the client_project
project.
The problem I'm facing is that I need to import the driver (for example scala.slick.driver.PostgresDriver.simple._
) in the models_project
to get many of the types that the model require.
I figured out how to configure those in a separate / independent project (so I'll have driver_project
and both client_project
and models_project
will depend on it), but this requires the configuration to be made at the driver_project
project. What I really want is for my models_project
to be agnostic of the driver and for client_project
to have a configuration of which driver to use, which it will push to models_project
it depends on.
Thanks for your help!