Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-546

New fetch mode EXTRA_LAZY for collections

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-BETA1
    • Fix Version/s: 2.1
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      A new fetch mode EXTRA_LAZY for one-to-many and many-to-many associations could have the following effects on PersistentCollection methods:

      • count() : Does not initialize the collection but issues a straight SQL count query.
      • remove($key) : Does not initialize the collection but issues straight SQL instead.
      • removeElement($element) : Does not initialize the collection but issues straight SQL instead.
      • contains($element) : Does not initialize the collection but issues straight SQL instead.
      • containsKey($key) : Does not initialize the collection but issues straight SQL instead.

      This mode would usually be useful for (potentially) large collections.

      We need to work out concrete use-case examples and implementation proposals before implementation.

      The semantics of the mentioned methods with EXTRA_LAZY need to be carefully worked out, i.e. what happens to already managed instances in case of the remove operations and stuff like that.

        Issue Links

          Activity

            People

            • Assignee:
              Benjamin Eberlei
              Reporter:
              Roman S. Borschel
            • Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: