Announcement Announcement Module
Collapse
No announcement yet.
Creating Tables Automatically with Hibernate and JPA Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Creating Tables Automatically with Hibernate and JPA

    Hi All,

    actually I have created Entity Beans which are used to create tables in mysql database, everything is working fine with transaction classes using entityfactory.

    Now I need this functionality...when I deploy the EAR file in application sever JBOSS..it have to check whether the tables are existing in the database or not..if they are not present..it have to create the tables automatically..of course I have specified this function hibernate.hbm2ddl.auto=update in persistence.xml..but still not creating any tables which are not present in the database and not throwing any error also when ever I run the application server.

    Can any one please give me an idea how to do this or please give me an example. Is there any few more steps to achieve this?

    Thanks in Advance.


    Best Regards,
    Raja.
    Last edited by raja_jan09; Nov 11th, 2010, 10:26 AM.
Working...
X