Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Support javax.validation.constraints (@NotNull, @Size...) #208

Closed
jmcollin78 opened this Issue · 3 comments

3 participants

@jmcollin78

Hello,
It would be great if Kundera could support the model constraints validation like @NotNull, @Size, ...

Example on an Entity:
@NotNull
@Size(min = 1, max = 256)
@Email
@Column(name="email")
private String email;

@NotNull
@Size(min = 3, max = 50)
@Column(name="pseudo")
private String pseudo;

This simplify drastically the code. This must be called before an Entity is created (persist or merge) or updated. If validation failed, a ConstraintViolationException must be send. It contains detailled informations of the constraint and the field in error.

JM.

@oprobst88

This would be really great!
Thanks
Oliver

@mevivs mevivs was assigned
@mevivs
Collaborator

Moving it to 2.10 release for assessment. Though @Notnull constraints doesn't make much sense in most of NoSQL databases.

-Vivek

@mevivs
Collaborator

Support for bean validation has been added in this 2.10

-Vivek

@mevivs mevivs closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.