Skip to content

Hibernate schema validation fails with JPA event publication registry #1543

@vkarppinen

Description

@vkarppinen

When using spring.jpa.hibernate.ddl-auto=validate with the JPA event publication registry and the documented PostgreSQL schema, Hibernate fails with:
Schema validation: column defined as not-null in the database, but nullable in model - [event_type] in table [event_publication]

The documented schema defines columns like event_type, listener_id, etc. as NOT NULL, but Hibernate sees the entity model as nullable and fails validation.

Is there a recommended way to use schema validation with the JPA event publication registry?

Versions:
Spring Modulith: 2.0.2
Spring Boot: 4.0.2
Hibernate: 7.2.1.Final

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions