Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1585

Doctrine2 doesn't check for the correct entity type on @ManyToOne relations

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.5
    • Fix Version/s: 2.2
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      I made a mistake when creating a @ManyToOne entity:

      /**

      • @ManyToOne(targetEntity="Entities\EntityA")
        */
        private $test;

      However, I was setting Entities\EntityB into $test.

      Doctrine2 doesn't check for this, resulting in a hard-to-find issue.

        Issue Links

          Activity

          Timo A. Hummel created issue -
          Guilherme Blanco made changes -
          Field Original Value New Value
          Link This issue duplicates DDC-1586 [ DDC-1586 ]
          Benjamin Eberlei made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 2.2 [ 10157 ]
          Resolution Fixed [ 1 ]
          Benjamin Eberlei made changes -
          Workflow jira [ 13339 ] jira-feedback [ 15184 ]
          Benjamin Eberlei made changes -
          Workflow jira-feedback [ 15184 ] jira-feedback2 [ 17048 ]
          Benjamin Eberlei made changes -
          Workflow jira-feedback2 [ 17048 ] jira-feedback3 [ 19301 ]

            People

            • Assignee:
              Benjamin Eberlei
              Reporter:
              Timo A. Hummel
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: