We are trying to create two different entity objects in hibernate for two tables with same name, but different structure, schema and different primary keys. While spring getting initialized, we are getting duplicate mapping exception. This application is based on multiple tenant, and each tenant will have the same table name and same primary keys. With this respect to this specific scenario, we have two tables with same name but different structure and different primary key.Can you please suggest whether we need to rename the table or any other approach in hibernate to handle this scenario,please?
Thanks
|