finding values through hibernate
@Override public String persist(){ //check if the nlc is duplicated here if(getEntityManager().find(JourneyLocation.class, this.instance.getNlc())!=null){ getFacesMessages().add(FacesMessage.SEVERITY_ERROR, "#{messages.nlcExists}") ; return null; }else{ return super.persist(); } }