I need to check in the database if the information that the user is trying to insert already exists, for example:
In the registration of a company, I can not allow the same CNPJ for others. I'm doing in JSF 2 with JPA2 Hibernate. I did an example video lesson from Algawors, but there was no such treatment.