1 Reply Latest reply on Jul 14, 2006 3:54 PM by Chris Husband

    Lob is not being lazily loaded

    Chris Husband Newbie

      I apologize if this is not the correct forum...

      I have a byte[] in an entity that I am annotating with lob and fetch=lazy. Yet when I retrieve it though a session bean, it is fully loaded. I heard that "lazy" is only a hint. It is important that I only lazily load this. Is there a more correct way to do this?

      In Entity:

      private byte[] data;
      public byte[] getData() {
       return data;

      Things I've tried:
      I tried using a secondarytable annotation, but the field was still eagerly loaded.

      I tried creating a data table and a OneToOne relationship, but when I set this relationship to be lazily loaded, jassist returns an error.

      I got it to work with a OneToMany relationship, but that "bugs" me since it is really a one-to-one relationship.

      Thanks for the help