Fixed duplication exception with JPA