[jboss-user] [Beginner's Corner] - Re: Jboss 4.2 and Hibernate: How do I autogenerate tables in database
Devinder Singh
do-not-reply at jboss.com
Mon May 2 15:12:38 EDT 2011
Devinder Singh [http://community.jboss.org/people/devinderpal] created the discussion
"Re: Jboss 4.2 and Hibernate: How do I autogenerate tables in database"
To view the discussion, visit: http://community.jboss.org/message/603080#603080
--------------------------------------------------------------
In JBoss 6, you can add persistence.xml with below settings. This file is in META-INF dir of EJB.
<persistence-unit name="<some name>" transaction-type="JTA">
<jta-data-source>java:DefaultDS</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="update" />
</properties>
</persistence-unit>
Not sure if this will work with Jboss 4. But I think similar settings will go into hibernate.cfg.xml file to autogenerate tables.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/603080#603080]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110502/46a9da83/attachment-0001.html
More information about the jboss-user
mailing list