This is weird and probably not possible but I’ll ask anyway. I’m making this app that reads in a meta file and creates some tables then populates them with data. I was wondering if I could somehow use JPA to populate those tables. Obviously, there’s no way I could have an entity with annotations on it since the table didn’t exist at compile time. But perhaps JPA or the entity manager has a way to load data into a table that without an entity class?
If possible, I’d expect a method like
entityManager.update("myTableName", hashMapOfColumnNamesAndColumnDataValues);
You could maybe use a native SQL query. Have a look at the
EntityManager#createNativeQuerymethods.