title: Is it possible to generate JPA entity classes from a database schema at runtime?
body: <p>IDEs like Netbeans allow generation of entity classes through a persistence context. If you had access to underlying generation method (not sure if it is an external tool or part of the IDE), could you <strong>generate database entity classes dynamically at runtime?</strong> The idea being that you could hook into the entity classes using reflection.</p>
  
  <p>I know you can go the other way and generate the database from the entity class, however due to permissions issues in my work environment that would be a no go. However, if you reverse the process and pull the classes from the database it may be feasible in my environment. The idea being that the database would serve as a single point of configuration/control.</p>