Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

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

Closed
jmcollin78 opened this Issue Mar 12, 2013 · 3 comments

Comments

Projects
None yet
3 participants

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.

This would be really great!
Thanks
Oliver

@ghost ghost assigned mevivs Dec 20, 2013

Collaborator

mevivs commented Dec 20, 2013

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

-Vivek

Collaborator

mevivs commented Jan 31, 2014

Support for bean validation has been added in this 2.10

-Vivek

@mevivs mevivs closed this Jan 31, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment