method getCheckCondition called with generate-ddl off

Description

Hibernate 6.4. During Spring Boot application startup, the getCheckCondition method (of BooleanJavaType) is called for each Boolean property of the entity, even though the settings specify that SQL schema generation should not take place (generate-ddl: false and ddl-auto: none). This behavior, in addition to being suboptimal, creates issues in Spring Boot applications when there are AttributeConverters that are used in default BooleanJavaType.getCheckCondition and before the injection of the necessary components for conversion. In addition the condition generated, does not support non-deterministic conversions: (it's not guaranteed that true will always map to the same value by converter).

Problem discussed in topic: https://discourse.hibernate.org/t/check-condition-for-booleanjavatype-with-boolean-converter/11020

Method getCheckCondition should not be called with ddl-auto: none and generate-ddl: false.

Activity

Show:

Details

Assignee

Reporter

Components

Affects versions

Priority

Created February 12, 2025 at 2:00 PM
Updated February 12, 2025 at 5:38 PM

Flag notifications