diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java b/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java index 2d25d7a380..271d6fec23 100644 --- a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java +++ b/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java @@ -335,7 +335,7 @@ public class SchemaExport { } public void execute(Target output, Type type) { - if ( output == Target.NONE || type == SchemaExport.Type.NONE ) { + if ( (outputFile == null && output == Target.NONE) || type == SchemaExport.Type.NONE ) { return; } exceptions.clear();