Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2550

Inverse side of x-to-one can never be lazy

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.3.4
    • Fix Version/s: None
    • Component/s: Mapping Drivers, ORM
    • Security Level: All
    • Labels:
      None

      Description

      Here is a note that "Inverse side of x-to-one can never be lazy"

      https://github.com/doctrine/doctrine2/blob/29d6da0fa063d55d06117045f3446b2716202d2b/lib/Doctrine/ORM/UnitOfWork.php#L2587-L2588

      I don't understand, why there cannot be a proxy. But ok, let's say that for some internal implementation reason there canno be a proxy yet. That means there should be at least an exception raised, when validating schema, telling me this crucial information.

      Doing a select over 500 entities would result in 501 queries just because I didn't know about this.
      If the validator would tell me, I'd join the entity and had 1 query executed.

      Resoltion: you shouldn't allow me to define the association as lazy, or use proxies.

      Thank you.

        Activity

        Filip Procházka created issue -
        Marco Pivetta made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Benjamin Eberlei [ beberlei ] Marco Pivetta [ ocramius ]
        Resolution Duplicate [ 3 ]

          People

          • Assignee:
            Marco Pivetta
            Reporter:
            Filip Procházka
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: