0 Replies Latest reply on Jul 10, 2007 3:42 AM by Markus Welser

    EntityNotFoundException

    Markus Welser Newbie

      HI,
      i get the following Exception during loading of an Entity:

      javax.persistence.EntityNotFoundException: Unable to find hji.entities.Customer with id 0

      caused by the following code:

      @ManyToOne
      @JoinColumn(name = "FZAG#",nullable=false)
      private Customer storageDealer;
      

      ..and yes this is correct because id 0 really no exist in the referenced table. (long story why...and currentlynot possible to be changed)
      All i want is that in the case when ID is 0 the Customer will be set to NULL and no exception will stop loading the entitiy ! does anyone know how to do this?
      tx