Hi,
The create table statement is generated by hibernate, so you won't see a sql
script file for it.
With the hbm2ddl.auto set to create, it will means that hibernate auto
create the table for you if it's not there.
The table structure should closely match the hbm.xml file or whichever class
that is configured to be persist by Hibernate.
Hope this helps.
2010/7/28 永昌 丁 <dingyongchang(a)hotmail.com>
Hi ,kris ,thank you very much for your reply. I have orm.xml in
META-INF
folder.
Yesterday,i modified the persistence.xml to solve this problem like below:
=================persistence.xml================
<property name="hibernate.max_fetch_depth" value="3"/>
<!--property name="hibernate.hbm2ddl.auto" value="create"
/-->
<property name="hibernate.show_sql" value="true" />
==================persistence.xml END==============
I change the <property name="hibernate.hbm2ddl.auto"
value="create" /> into
comments,then
create the table in DB using the SQL:
========SQL========
create table Notification_EmailNotificationHeader
(Notification_id numeric(19,0) not null, emailHeaders_id numeric(19,0) not
null, mapkey varchar(255) not null, primary key (Notification_id,
mapkey), unique (emailHeaders_id))
=====SQL END========
it works ok now~
but i want to know where the SQL "creat table……" defined?