4 Replies Latest reply on Jul 12, 2007 4:28 AM by Markus Welser

    EntityNotFoundException during Entity load

    Markus Welser Newbie

      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:

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

      ..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 and no exception will stop loading the entities ! does anyone know how to do this?