Hibernate / EclipseLink Interview questions
What is DDL generation in EclipseLink?
DDL generation is EclipseLink's ability to automatically create (or drop and recreate) database tables based on an application's entity mappings, controlled through the eclipselink.ddl-generation persistence unit property.
<property name="eclipselink.ddl-generation" value="create-tables"/> <property name="eclipselink.ddl-generation.output-mode" value="database"/>
Common values include none (do nothing, the default for production use), create-tables (create tables that don't already exist), and drop-and-create-tables (wipe and recreate the schema on every startup). The output-mode property controls whether the generated DDL is applied directly to the database, written to a SQL script file, or both.
DDL generation is convenient for local development and quick prototyping, but production systems almost always manage schema changes through a dedicated migration tool instead, since automatic generation doesn't handle data migration, indexes, or constraints beyond what the entity mappings directly imply.
More Related questions...