13 Replies Latest reply on Oct 30, 2006 12:11 PM by Vikas Phonsa

    Tryed searching for this issue, but haven't found anything.

    Kyle Murphy Newbie

      Ok, I've got a entity bean with a property annotated like so:
      @JoinColumn(name="background", nullable=false)
      @ManyToOne(cascade={CascadeType.PERSIST}, fetch=FetchType.EAGER)
      public Background getBackground() {
      return background;

      Which if I'm reading everything properly should cause the Background object to be initialized when the entity bean is loaded from the DB, however I keep getting a LazyInitiaalizationException when I attempt to access that method saying that the owning session was closed.
      Why is it trying to load the background lazily when I specificly listed it as non-lazy and eager?