To fix this issue There are several approaches to multi-tenant databases. For discussion, they're usually broken into three categories. One database per tenant. Shared database, one schema per tenant. Shared database, shared schema. A tenant identifier (tenant key) associates every row with the right tenant.
Hibernate and Multi-Tenant Database using Schemas in PostgreSQL
like below fixes the issue I would use a single database for sure. Use the following to get started. There are several reasons to go with a single db, however the biggest reason of all is to save you from a maintenance nightmare. If you have to change the schema, you will have a mess on your hands. http://msdn.microsoft.com/en-us/library/aa479086.aspx
Multi-Tenant and Central Database with Spring Boot and Hibernate
Hope that helps This blog gives a very good tutorial on how to do it. After a lot of research it looks like hibernate just isn't built for doing that, but by manually writing the schema myself I can inject that into new tenant databases using native queries.
how to manage dynamic tables with hibernate - multi tenant database