When generating a DB schema via Persistence#generateSchema(), Bean Validation constraints are not considered when creating the create DDL statements. BeanValidationIntegrator#integrate() is never called in that case, hence TypeSafeActivator isn't invoked either, which would amend the DDL based on constraints such as @NotNull, @Size etc. If I bootstrap an EMF and e.g. trigger schema generation via javax.persistence.schema-generation.scripts.action the constraints show up in the emitted DDL as expected. |