Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-3228

ORM\Tools\Export\Driver\PhpExporter.php does not properly export manyToOne associations

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: Git Master
    • Fix Version/s: None
    • Component/s: Mapping Drivers, ORM, Tools
    • Security Level: All
    • Environment:
      PHP 5.5.9-1ubuntu4 (cli)

      Description

      PhpExporter.php fails to check the association for manyToOne/oneToOne and exports all associations as oneToOne.

      See https://github.com/doctrine/doctrine2/tree/master/lib/Doctrine/ORM/Tools/Export/Driver/PhpExporter.php#L116 where oneToOne is hardcoded if the bitmask matches either manyToOne or oneToOne.

      As opposed to YamlExporter.php:

      https://github.com/doctrine/doctrine2/tree/master/lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php#L165

      Which does roughly the same thing, but then properly sets the association type by checking the actual association on lines 186 through one 190:

      https://github.com/doctrine/doctrine2/tree/master/lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php#L186-L190

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Dan V
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: