Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 2.3.2
    • Fix Version/s: None
    • Component/s: ORM

      Description

      Hi,

      I'm currently using intensively the Criteria and Selectable interfaces to provide a generic REST library.

      However, I've found a problem when I want to paginate data:

      count
      return count($this->selectable->matching(new Criteria()));
      

      The problem is that EntityRepository returns an ArrayCollection and, hence, load the whole collection which is inefficient. It would be nice if it could return a PersistentCollection instead with lazy-load and perform an optimized count.

      Thanks

        Activity

          People

          • Assignee:
            Marco Pivetta
            Reporter:
            Michaël Gallego
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: