<div>Hi,</div>
<div> </div>
<div>The create table statement is generated by hibernate, so you won't see a sql script file for it.</div>
<div> </div>
<div>With the hbm2ddl.auto set to create, it will means that hibernate auto create the table for you if it's not there.</div>
<div>The table structure should closely match the hbm.xml file or whichever class that is configured to be persist by Hibernate.</div>
<div> </div>
<div>Hope this helps.</div>
<div> </div>
<div><br><br> </div>
<div class="gmail_quote">2010/7/28 ÓÀ²ý ¶¡ <span dir="ltr"><<a href="mailto:dingyongchang@hotmail.com">dingyongchang@hotmail.com</a>></span><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>Hi ,kris ,thank you very much for your reply. I have orm.xml in META-INF folder.<br>Yesterday,i modified the persistence.xml to solve this problem like below:<br> <br>=================persistence.xml================<br>
<br> <property name="hibernate.max_fetch_depth" value="3"/><br> <font color="#ff0000"><!--property name="hibernate.hbm2ddl.auto" value="create" /--><br></font> <property name="hibernate.show_sql" value="true" /><br>
<br>==================persistence.xml END==============<br> <br>I change the <font color="#ff0000"><property name="hibernate.hbm2ddl.auto" value="create" /> </font><font color="#000000">into comments,then </font><br>
<font color="#000000">create the table in DB using the SQL:</font><br>========SQL========<br><font color="#000000">
<div class="im">create table Notification_EmailNotificationHeader<br> (Notification_id numeric(19,0) not null, emailHeaders_id numeric(19,0) not<br></div>null, mapkey varchar(255) <font color="#ff0000">not null</font>, primary key (Notification_id, mapkey), unique (emailHeaders_id))</font><br>
<br>=====SQL END========<br> <br>it works ok now~<br> <br>but i want to know where the SQL "creat table……" defined?<br><br> <br></div></blockquote></div>