@Retention(value=RUNTIME) @Target(value=FIELD) public @interface NotNull
@Column(nullable=false)
or javax validation @NotNull.
We would typically prefer to use the standard annotations but with entity beans
written in Kotlin as constructor properties the javax validation @NotNull
is applied as parameter on the constructor rather than as a property mapping.
So it is generally not ideal to use this non-standard JPA annotation but some may prefer it style wise - especially with Kotlin.
Copyright © 2019. All rights reserved.