0

I have to create an Entity in my application from Database table using Hibernate. I do not have table structure or schema before hand i.e. In my application, I will select a particular table from a list of tables . And from selected table, I 'll choose a set of columns . And using theses columns I have to create POJO classes and Mappings( either in .XML form or using annotations).

I have searched for the same. I found a tool which converts Database Table to object. But I want to do this at run time.

Hibernate Reverse Engineering Tool-

http://omtlab.com/java-hibernate-reverse-engineering-eclipse-tutorial/

1 Answers1

0

Don't believe you can do that, Hibernate loads and confirms the connection/schema at startup, not sure you should even be doing something like that. Sounds like a NoSQL type of problem that might be better handled there.

Scott Sosna
  • 1,443
  • 1
  • 8
  • 8