Affects versions: 5.2.16
Fix versions: None
Environment:I am using Spring Boot 2.0.1.RELEASE which pulls in Hibernate 5.2.16.Final with Hibernate Validator 6.0.9.Final
Bug Testcase Reminder (view):
Last commented by a user?:true
I am using Spring Boot 2 (2.0.1.RELEASE) with the default Hibernate version with H2 db and I have a problem with the field sizes in the table that is generated when using @Embeddable.
Here is my code:
public class Publisher
public class Address
When Spring Boot fires up it creates the tables in H2. The column size in the 'name' attribute in Publisher is correctly set up to 150 using the max value from the @Size annotation.
The max values in the @Size annotations for the embedded Address entity is ignored and set to 255 chars max for all 4 fields.
Is this the expected behaviour or should the db columns from the embedded fields be set to the max value from the @Size annotations in the Address entity?
I know I can set this using the length value of the @Column annotation but I was hoping to get this working without the extra @Column annotation.
I originally raised this question on StackOverflow and was asked to submit this here:
I haven't used Jira for a very long time so I apologise in advance if I make any mistakes in raising this issue.