Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ As we mentioned <<testing,earlier>>, it can also be useful to control schema exp
The link:{doc-javadoc-url}org/hibernate/relational/SchemaManager.html[`SchemaManager`] API allows programmatic control over schema export:

[source,java]
sessionFactory.getSchemaManager().export(true);
sessionFactory.getSchemaManager().create(true);
====

[[logging-generated-sql]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ public class Main {
.createEntityManagerFactory();

// export the inferred database schema
sessionFactory.getSchemaManager().export(true);
sessionFactory.getSchemaManager().create(true);

// persist an entity
sessionFactory.inTransaction(session -> {
Expand Down Expand Up @@ -729,7 +729,7 @@ This option is especially convenient when writing tests.

[source,java]
----
sessionFactory.getSchemaManager().export(true);
sessionFactory.getSchemaManager().create(true);
----

Since executing DDL statements is very slow on many databases, we don't want to do this before every test.
Expand Down
Loading