Can I use JPA/EJB3 on a table that was created at runtime?
        Posted  
        
            by tieTYT
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by tieTYT
        
        
        
        Published on 2010-04-08T05:01:34Z
        Indexed on 
            2010/04/08
            5:03 UTC
        
        
        Read the original article
        Hit count: 384
        
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);
        © Stack Overflow or respective owner