public class MetadataEventSchemaCreator extends Object implements EventSchemaCreator
MetadataEventSchemaCreator creates, on demand, the database tables used by the event
persistence feature.
Instead of hand-written DDL, it relies on Hibernate's own hbm2ddl tooling: a short-lived,
throwaway SessionFactory is built from the canonical entity model
(HypersistenceOptimizerBootstrapRun, HypersistenceOptimizerBootstrapEvent and
HypersistenceOptimizerRuntimeEvent) with hibernate.hbm2ddl.auto=update, so the
tables are generated with the exact types and identity strategy of the underlying database
dialect, across every database Hibernate supports. The throwaway SessionFactory borrows
connections from the host application's pool (via HostConnectionProvider) and is closed
immediately after the schema has been created; it is only used for DDL, never to
persist events (those are written with plain JDBC by EventStore).
| Constructor and Description |
|---|
MetadataEventSchemaCreator(EventPersistenceSettings settings) |
| Modifier and Type | Method and Description |
|---|---|
void |
createSchema()
Apply CREATE using the canonical IDENTITY mappings.
|
public MetadataEventSchemaCreator(EventPersistenceSettings settings)
public void createSchema()
createSchema in interface EventSchemaCreatorCopyright © 2026. All rights reserved.