Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-633

fetch="EAGER" is not loading one to one associations

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0-BETA4
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      <?php
      namespace vo;
      
      /**
       * @Entity
       */
      
      class Appointment {
      	
          /** @Id @Column(type="integer") @GeneratedValue(strategy="IDENTITY") */
          public $id;
      	
      	/**
           * @OneToOne(targetEntity="Patient", inversedBy="appointment", fetch="EAGER")
      	 * @JoinColumn(name="patient_id", referencedColumnName="id")
           */
      	public $patient;
      	
      }
      

      When doing a findAll() on appointments, $patient is being created as a proxy even though fetch is EAGER.

        Activity

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Dave Keen
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: