Ask a Question
Advertise on boostr.in
Organizational Research By
Surprising Reserch Topic
checks for constraint violation before persisting an entity
checks for constraint violation before persisting an entity ¬†using -'hibernate,jpa,seam,richfaces'
What is the best mechanism for preventing constraint violation checks before creation | modification of an entity?
Suppose if the 'User' entity has 'loginid' as the unique constraint, would it be wise to check ¬†if there is an user entry already with this loginid name before creation or modification.
Would you let the database throw an ConstraintViolationException and handle this message appropriately in the UI layer. Where should such checks be enforced in the jboss seam framework.
Note: Currently no such checks are enforced on the seam-gen code.
We currently use Seam 2.2, Richfaces with Hibernate.
Oct 19, 2015
to add a comment.
Related Hot Questions
Government Jobs Opening