[hibernate-dev] ORM DDL doesn't reflect BV constraints with validation mode CALLBACK

Gunnar Morling gunnar at hibernate.org
Sun Feb 4 07:21:21 EST 2018


If the JPA validation mode is set to CALLBACK, BV constraints such as
@NotNull, @Size etc. are not reflected in the DDL created by ORM.

Instead, in TypeSafeActivator, the BV constraints are only considered for
DDL if the validation mode is DDL or AUTO [1].

CALLBACK is the safe way to ensure BV is invoked by JPA (instead of
silently ignoring it if no BV provider is present), so it's the setting I
usually recommend. I think constraints should also be propagated to DDL in
this mode, so I'm wondering whether there a specific reason for the current
behaviour or wether we can change it?




More information about the hibernate-dev mailing list