<div>Hi,</div>
<div>&nbsp;</div>
<div>The create table statement is generated by hibernate, so you won&#39;t see a sql script file for it.</div>
<div>&nbsp;</div>
<div>With the hbm2ddl.auto set to create, it will means that hibernate auto create the table for you if it&#39;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>&nbsp;</div>
<div>Hope this helps.</div>
<div>&nbsp;</div>
<div><br><br>&nbsp;</div>
<div class="gmail_quote">2010/7/28 ÓÀ²ý ¶¡ <span dir="ltr">&lt;<a href="mailto:dingyongchang@hotmail.com">dingyongchang@hotmail.com</a>&gt;</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>&nbsp;<br>=================persistence.xml================<br>
&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name=&quot;hibernate.max_fetch_depth&quot; value=&quot;3&quot;/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#ff0000">&lt;!--property name=&quot;hibernate.hbm2ddl.auto&quot; value=&quot;create&quot; /--&gt;<br></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name=&quot;hibernate.show_sql&quot; value=&quot;true&quot; /&gt;<br>
&nbsp;<br>==================persistence.xml END==============<br>&nbsp;<br>I change the&nbsp; <font color="#ff0000">&lt;property name=&quot;hibernate.hbm2ddl.auto&quot; value=&quot;create&quot; /&gt; </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>&nbsp;(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),&nbsp;unique (emailHeaders_id))</font><br>
&nbsp;<br>=====SQL END========<br>&nbsp;<br>it works ok now~<br>&nbsp;<br>but i want to know where the SQL &quot;creat table&hellip;&hellip;&quot; defined?<br><br>&nbsp;&nbsp;<br></div></blockquote></div>