I have an @Entity
in JPA which has a @ElementCollection
like this:
@ElementCollection(fetch=FetchType.EAGER)
List<String> photodescription = new ArrayList<>();
The problem is that by default, the Column for any photodescription
is a VARCHAR(255)
.
I need to increase that to 10000.
Exists any anotation for the elements from a @ElementCollection
to set a maximum size like @Size(max=1000)
which is used for a simple String?
The @Column
annotation should still work for this collection of strings:
@ElementCollection(fetch=FetchType.EAGER)
@Column(length=10000) // OR @Column(columnDefinition="VARCHAR(10000)")
List<String> photodescription = new ArrayList<>();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With