comments = em.merge(comments);
}
em.getTransaction().commit();
} catch (Exception ex) {
if (findCommentrates(commentrates.getId()) != null) {
throw new PreexistingEntityException("Commentrates " + commentrates + " already exists.", ex);
}
throw ex;
} finally {
if (em != null) {
em.close();