How to use different tables for entity on runtime using JPA?

173
July 07, 2019, at 9:40 PM

I am building a COTs product which records sales data. Since it will be used by different business owners i want to save the sales data to the owner specific tables. So how do i use a single entity to perform operation on different tables based on unique owner id? My core object and business logic is the same. I am just stuck on how to persist data for each owner in a separate tables. I don't want to have it all in one table with owner id as unique. It just creates risk of impacting all the clients data while any update/migration to the table.

Rent Charter Buses Company
READ ALSO
Faulty code from book on viewing bubble sort

Faulty code from book on viewing bubble sort

I am running example code from this book, Data Structures and Algorithms in Java (2nd Edition) - LaFore, that is not behaving as expectedIn the third chapter there is example code for running a visual on bubble sorts

198
How to pass command line arguments to Junit Test

How to pass command line arguments to Junit Test

I have a main class that accepts command line arguments and I am passing this parameter to another classNow i have to test the myClass with parameters

1677
Java thread dump not detecting deadlock, no BLOCKED threads

Java thread dump not detecting deadlock, no BLOCKED threads

My server keeps running into a deadlock, and I'm not sure how to solve it

164