I get this error:
Failed to commit transaction: Attempt to reuse an existing primary key value (model.Assignatura:4)
tell me this part of the code:
public void modificar(Assignatura ass) throws GestorException {
//TODO codificar el metode modificar
em.getTransaction().begin();
em.persist(ass);
em.getTransaction().commit();
}
I do not know what can be wrong .. can you help me?