Im working with Jsf2: XHTML in the presentation layer, CDI Bean in Business logic and Hibernate in the data layer.
I have some inputs in the xhtml file for store an object and submit those data to data base.
I don't want to save an empty object in DB and I validated this by putting @NotNull
in the attribute in the entity.
The problem here is @NotNull
is not working and the form still save an empty field in DB.In fact , @NotEmpty
is working good.
What is the problem please.
Thank you