@Size not applied to history columns

Description

I have some String properties in my JPA model, which have a @Size without any @Column annotation:

Hibernate generates the correct DDL for this property:

But Envers will generate a wrong DDL for this:

As the result I can't store entities with long String properties.

The reason is that Envers generates the metadata before the BeanValidationIntegrator applies its constraints - and no adjustment of the audit columns takes place.

In version 4.1.6 the same model was working.

Environment

Wildfly 10.1.0, hibernate-core 5.0.10, hibernate-validator 5.2.4.Final

Assignee

Chris Cranford

Reporter

Tobias Liefke

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure