Hi, I am facing issues in inserting data from a web application (Using OpenJPA) into DB2 table which is renamed daily. The issue is :
My Application reads data from a flat file every day and inserts into a table whose name is like * <<CONSTANT>> appended by <<YYYY_MM_DD>>* So the table name changes everyday (the table will end with date on which the data is inserted). I am facing issue in implementing this in OpenJPA as the mappings are already done in persistence.xml and cannot be changed. How can we make this run time mapping to map the existing entity class to new table name? I have explored few Options like Meet in the middle approach. But no luck as these classes are mapped in class tag I was able to get some pointers to connect with different user ids at run times but could not find a way to update these classes in EntityManager class. Could anyone pls help me in resolving this issue?
