My app is required to perform some user-driven CRUD operations on two
databases simultaneously. This is not the normal situation, but it
applies to a low-activity admin controller.
My current solution involves three models - DbDual, DbPrimary, and
DbSecondary. DbDual uses the other two within nested transactions,
and DbSecondary does an establish_connection to connect it to the
This seems to work fine, although it's _very_ slow. I assume the
slowness is due to the connecting each time the object springs into
So my question is, how can I make a connection (and maintain it)
I've searched the web for solutions, but I'm not seeing what I think I
want. I think I just want a simple connection made during boot, and
then be able to tell a model to use that connection.