Hi All,
I have created hbm file which contains all mapping.
Now when I run my main() function, if tables which are define in .hbm file not present in DB then hibernate create for me, that's good one.
But Now I want to print that all Create table script.
I have try with
Code:
<property name="show_sql">true</property>
in .cfg file and
Code:
log4j.logger.org.hibernate.SQL=true
in log4j.properties, but still I didn't get Create script.
Using above property, it prints all insert, update, delete script but I want Create table script also.
.cfg file
Code:
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>
<property name="hibernate.connection.url">jdbc:sqlserver://192.168.1.214:1533</property>
<property name="hibernate.connection.username">DEV_RFG_ANALYTIX4</property>
<property name="hibernate.connection.password">DEV_RFG_ANALYTIX4</property>
<property name="hibernate.connection.pool_size">10</property>
<property name="show_sql">true</property>
<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<!-- Mapping files -->
<mapping resource="HibernateMapping.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Can any one know about this?
Thank You,
Navnath Kumbhar.