Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-888

PHP stars to complain if no joinColumns/inverseJoinColumns provided for JoinTable annotation

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.0-BETA4
    • Fix Version/s: 2.0-RC1
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      The problem is rather trivial - if no joinColumns or inverseJoinColumns provided for the JoinTable annotation declaration, then PHP will complain on lines 215/225 of Doctrine\ORM\Mapping\Driver\AnnotationDriver. The easiest way to eliminate this problem is to simply initialize these fields in the annotation-class:

      DoctrineAnnotations.php
      final class JoinTable extends Annotation {
          public $name;
          public $schema;
          public $joinColumns = array();
          public $inverseJoinColumns = array();
      }
      

        Activity

        Hide
        Benjamin Eberlei added a comment -

        Fixed

        Show
        Benjamin Eberlei added a comment - Fixed

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Sergei Lissovski
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: