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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: