Where I'm working, we have multiple database we need to be able to query. Some of them are predefined and we're using Datasources to access. Others are named after the customer id #. For instance _2. We have hundreds of customers and some customers can pose as other customers and depending on which customer is using the interface at that time, we would need to connect to their specific database for their specific data.
I've read this is not possible with Grails but I'm having a hard time believe that there is no way to do this at all. Is there some possible way to write a plugin or mess with hibernate that would allow a dynamic connection like this? Has anyone come across this issue yet and what have you done to deal with it?
Any information will be helpful. We've hit a dead end with our development due to this crazy database design!