Can I use JPA/EJB3 on a table that was created at runtime?
- by tieTYT
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 nameless table?
If possible, I'd expect a method like
entityManager.update("myTableName", hashMapOfColumnNamesAndColumnDataValues);