Spring web app tutorial 39: Hibernate unique column

How to set column unique using Hibernate (JPA). This will cause ConstraintViolationException trying to insert non-unique username.

How to set column unique using Hibernate (JPA). This will cause ConstraintViolationException trying to insert non-unique username.