Add database unique key constraint in application level, via Javax.Persistence annotations Column and/or Table
It is very common that you want to add some unique key constraint in your database schema. Say for a online shopping system you have the following entity: public class CreditCard { private UUID id; private long number; private long customerId; private String nickname; ...