krebsnet wrote:
Hi,
I’m developing one web application with one data model using hibernate. My catch is that I’ll have different clients using the same application but I want each client to have its own set of database tables that mirrors the data model. It seems like this would be a cleaner approach than trying to code contextID’s into my data model. The flip side though is that if I make a schema change then I’ll have multiple sets of tables that will need to be updated. Does anyone have any advice as to how I should go about this? Thanks
It is much easier to add a 'client' object to the model, add the appropriate associations on the objects that are owned by each client, and then let the DAOs take care of accessing the objects in the appropriate context.
Creating a separate set of tables per 'client' will probalby just cause you a world of pain.