@Retention(value=RUNTIME) @Target(value=FIELD) public @interface Length
@Column(length).
We would typically set the length of a varchar column using @Column(length)
or via javax validation @Size(max) annotations.
In Kotlin we tend NOT to use the @Size(max) annotation as it has more
targets (including parameter) and so when beans are written in Kotlin constructor form
the @Size is not read as a mapping.
So it is generally not ideal to use this non-standard JPA annotation but some may prefer it style wise - especially with Kotlin.
| Modifier and Type | Required Element and Description |
|---|---|
int |
value |
public abstract int value
Copyright © 2019. All rights reserved.