@Override public void updateDeath(Death d) { em.getTransaction().begin(); Death target = em.find(Death.class, d.getId()); target.setCountry(d.getCountry()); target.setEventDate(d.getEventDate()); target.setPerson(d.getPerson()); target.setState_province(d.getState_province()); target.setTown(d.getTown()); em.merge(target); em.getTransaction().commit(); }