The database I am working with has many tables with the same columns but with (obviously) different table names (I didn't design it). For example (these are database table names):
company1Data
company2Data
company3Data
etc.
Would it be possible to map these to one Java class entity with JPA and hibernate? The name of the class would be Data
, and then pass in for example company1
somewhere when using it so that object would use the company1Data
table?
Or is it better to just use normal, plain Java objects for something like this?
Thank you!