I use JDeveloper 11g.
I create EntityBean, SessionBean and I create persistance_unit with HIBERNATE anottation.
<persistence-unit name="HibernatePU"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <properties> <property name="hibernate.archive.autodetection" value="class, hbm"/> <property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver"/> <property name="hibernate.connection.url" value="jdbc:oracle:thin:@localhost:1521:XE"/> <property name="hibernate.connection.username" value="zoran"/> <property name="hibernate.connection.password" value="zoran"/> <property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect"/> <property name="hibernate.hbm2ddl.auto" value="create-drop"/> </properties> </persistence-unit>
The answer is here.
http://www.jroller.com/eyallupu/entry/hibernate_s_hbm2ddl_tool