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
When using
spring.jpa.hibernate.ddl-auto=validatewith 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