I had successfully written my first master child example with hibernate. After few days I took it again and upgraded some libraries. No sure what did I do but I could never
For JPA fixed using EntityManager merge() instead of persist()
EntityManager em = getEntityManager(); try { em.getTransaction().begin(); em.merge(fieldValue); em.getTransaction().commit(); } catch (Exception e) { //do smthng } finally { em.close(); }