posted 13 years ago
I am pretty new to JPA, and I have run into a problem where we have several tables with entities of the same type.
Example:
Tables:
Itemtable2002
Itemtable2003
Itemtable2004
Itemtable2005
Itemtable2006
Itemtableybly (last year)
Itemtable (this year)
Entity for all is "Item"(same columns for all, but different data).
What I need to do, is to allow the user to choose what table to pull data from at runtime.
Any suggestions about how this can be done? The tables can not be altered.