8.3. Improving schema DDL

Customizing the DDL in your Hibernate application is something you'll usually consider only when you generate the database schema with Hibernate's toolset. If a schema already exists, such customizations won't affect the runtime behavior of Hibernate.

You can export DDL to a text file or execute it directly on your database whenever you run your integration tests. Because DDL is mostly vendor-specific, every option you put in your mapping metadata has the potential to bind the metadata to a particular database product—keep this in mind when applying the following features.

We separate DDL customization into two categories:

  • Naming automatically generated database objects, such as tables, columns, and constraints explicitly ...

Get Java Persistence with Hibernate now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.