1 Reply Latest reply on Sep 3, 2007 5:27 PM by manuelpalacio

    Exception "deleted entity passed to persist"

    hager

      hello,
      I have a OneToMany relation between Pret and EcheancePret.
      when i create one Pret, a list of EcheancePret is automaticaly created and inserted in the database,
      but when i want to update my Pret, i have to delete the list of EcheancePret, create and insert a new one,
      this is my code:

      /*** PretHome.java ***/
      
      Set<EcheancePret>listeEcheancePret=this.getInstance().getEcheancePrets();
      for(EcheancePret echeance : listeEcheancePret)
      {
      this.echeancePretHome.setInstance(echeance);
      this.echeancePretHome.remove();
      }


      but i have an exception :
      deleted entity passed to persist: [com.fitnetapplication.resources.model.EcheancePret#<null>]

      what can i do?
      please help me!
      thx.