Uploaded image for project: 'Doctrine 2 - ORM'
  1. Doctrine 2 - ORM
  2. DDC-2217

Return a lazy collection from PersistentCollection::match($criteria)



      In 2.3, PersistentCollection::match() has been implemented by doing the query directly. But sometimes, the only meaningful information about the matched collection would be its length. In this case, it would be great to handle it in the same way than extra lazy collections are handled: the matched collection would be initialized lazily, and could do the count in an extra lazy way (if the original collection was extra lazy).
      This would of course not change anything in the case where the original collection was already initialized.

        Issue Links


          stof Christophe Coevoet created issue -
          ocramius Marco Pivetta made changes -
          Field Original Value New Value
          Priority Minor [ 4 ] Major [ 3 ]
          maciekpak Maciej Klemarczyk made changes -
          Labels collection
          bakura Michaƫl Gallego made changes -
          Comment [ +1 on this one! This is really something that prevents me to use Criteria API! ]
          guilhermeblanco Guilherme Blanco made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Benjamin Eberlei [ beberlei ] Guilherme Blanco [ guilhermeblanco ]
          Fix Version/s 2.5 [ 10522 ]
          Resolution Fixed [ 1 ]
          ocramius Marco Pivetta made changes -
          Link This issue relates to DDC-2865 [ DDC-2865 ]
          ocramius Marco Pivetta made changes -
          Labels collection collection lazy-criteria-collection lazy-loading
          ocramius Marco Pivetta made changes -
          Component/s ORM [ 10012 ]


            • Assignee:
              guilhermeblanco Guilherme Blanco
              stof Christophe Coevoet
            • Votes:
              8 Vote for this issue
              7 Start watching this issue


              • Created: