| Having following in my persistence.xml:
<property name="javax.persistence.schema-generation.database.action" value="update" />
<property name="javax.persistence.schema-generation.scripts.action" value="update" />
then Hibernate creates/alters tables, columns, etc. like it should. That's fine. However I can not log the used database statements anywhere! E.g. when using create / drop-and-create / drop as actions and configure:
<property name="javax.persistence.schema-generation.scripts.create-target" value="create.ddl"/>
<property name="javax.persistence.schema-generation.scripts.drop-target" value="drop.ddl"/>
the create.ddl and drop.dll file gets created and contains the statements. However it seems there is no way to create such a script file when using update. I would expect that there should be a setting like:
<property name="javax.persistence.schema-generation.scripts.update-target" value="update.ddl"/>
but this doesn't work. Please give us a way to generate a script file when using the update action, thanks! |