0
我有以下的persistence.xml:爲什麼在hibernate4-maven-plugin(Hibernate 4.3.6)中不能使用hbm2ddl.import_files?
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" version="2.0">
<persistence-unit name="blah" transaction-type="RESOURCE_LOCAL">
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/>
<property name="hibernate.hbm2ddl.auto" value="create"/>
<property name="hibernate.hbm2ddl.import_files" value="myfile.sql"/>
</properties>
</persistence-unit>
</persistence>
但hibernate.hbm2ddl.import_files
財產不能正常工作。似乎並不重要,我把myfile.sql放在哪裏,或者用斜槓或甚至通配符,類路徑等(抓住吸管) - 它從來沒有發現它,並且日誌輸出並不表示它正在尋找它。默認使用import.sql代替(和工作)。
注意:看過類似的問題(例如this和this),但沒有一個解決方案適用於我。