0 Replies Latest reply on Mar 10, 2004 4:44 PM by mkyaj

    Lazy loading in CMR

    mkyaj Newbie

      Hi ,

      I am using JBOSS 3.2.2. I am so confused about the read-ahead strategy. Please help me in the following scenarios.

      a) I think whenever an entity is getting loaded the CMR values will not be loaded unless we access that CMR values. am i correct? Pls correct me if i am wrong about that.

      b) I can specify the <read-ahead>on-find</read-ahead> for any query in that query element.
      But how can we specify the same read-ahead strategy for a CMR?
      Ex: I have a relation poll(1) - polloption(m). So my requirement is that when i load the poll entity i want to load only the CMP fields so i declared a load-group with only CMP's and declared that as eager-load-group. When i access the CMR field i want all the CMR records of that entity to be loaded at once using on-load strategy. So for that where can i declare the strategy. Will it be enough if i declared the <read-ahead> strategy at the polloption entity level?

      Thanks in advance,
      Murali.