3 Replies Latest reply on Mar 4, 2004 12:14 PM by donpreuss

    Lazy-loading on a single field

    tom2002

       

      "tom2002" wrote:
      "tom2002" wrote:
      "tom2002" wrote:
      Has anybody had luck lazy loading a single field from a table? I have a table which stores binary data which can get quite large. I would like to load the records from that table without loading the binary field. I would like the binary field to be retrieved only if specifically asked for through the bean (myBean.getBinaryData()). Has anybody been able to accomplish this?


      Thanks for any help.
      Tom


        • 1. Re: Lazy-loading on a single field
          mitza

           

          "mitza" wrote:
          "mitza" wrote:
          "mitza" wrote:
          Hi Tom,

          I have exactly the same problem. I tried to put in load-groups, but no luck -- the whole record (object) is retrieved in the bean.

          Any chance that you found out the answer to this problem?

          Anybody?


          TIA,
          Mihai


          • 2. Re: Lazy-loading on a single field
            donpreuss

            Anyone from JBOSS? We have the same problem, and I'm thinking I might split the table into two tables. One with the meta data and the other with an ID and the binary field to get around this problem.

            thx..

            donp

            • 3. Re: Lazy-loading on a single field
              donpreuss

              Never mind... I figured it out... between adding lazy-load groups, eager load (and the important part), setting a <read-ahead> of the eager-load-group after the it works.

              If someone needs more detail, send me email and I can send you our example.