I have the following situation, the user should be able to see an overview of all available tables.
Then the user can choose the table he wants to work with. In a second step, the user should choose several columns from all tables.
If the user has chosen all tables and columns, the gathered data shall be displayed (for example in a table).
My question is, if that is possible with JPA. My main concern is that I cannot know which tables and columns the user will choose,
so that I will need a very generic class structure.
For example:
UserBuildDataQuery == has many ==> tables == has many ==> columns
I thought about the possibility to store the data query which was configured from the user in the database.
Depending on the stored data the user generated query will be executed so that I can present the gathered data.
I’m not sure if JPA is the perfect choice for that problem.
Maybe you can give me some suggestions or experiences from your own.
JPA is obviously about classes and fields, not tables and columns, and is about storing objects of those classes.
JDBC however is about what is in the datastore (i.e tables/columns). It even provides methods to get the structure of the datastore.