1 Reply Latest reply on Jul 19, 2006 2:17 PM by Gavin King

    How does the datamodel get populated

    flo thomas Newbie

      Hi,
      I was wondering how the datamodel gets populated. Are all entries retrieved right away? I display information page-wise, and sometimes there could be 30-40 pages of data, so is the actual object only loaded into memory when I access it or is everything that's in the datamodel in memory? Should I manually use limit-queries (which I didn't think were supported [i.e. limit (20,80)] ) or is it feasible to always use the subList?

      I have right now the following
      private List everything;
      @DataModel
      List subset;
      initially I populate the list everything with the em.query("from stuff")...
      when the next() is called I do
      public void() {
      subset = everything.subList(pos,pos+size);
      }

      Is there anything wrong with that approach? Anything I could improve? The reason why I am asking is that sometimes I have high response times, which I have yet to understand..
      Thanks,
      joey