Doctrine 1
  1. Doctrine 1
  2. DC-730

"// ?? should this not be $this->_table->getComponentName() ??" in Doctrine/Relation/Parser.php

    Details

    • Type: Task Task
    • Status: Open
    • Priority: Trivial Trivial
    • Resolution: Unresolved
    • Affects Version/s: 1.2.2
    • Fix Version/s: None
    • Component/s: Relations
    • Labels:
      None
    • Environment:
      doctrine1 svn 1.2 rev. 7676

      Description

      In class Doctrine_Relation_Parser, in method completeDefinition(), at line 508 (for svn r.7676) there is the code:

      php
                      foreach ((array) $this->_table->getIdentifierColumnNames() as $id) {
                          // ?? should this not be $this->_table->getComponentName() ??
                          $column = strtolower($table->getComponentName())
                                  . '_' . $id;
      

      The comment on line 509 seems right, since $table is a "temporary" variable created in a previous foreach loop a few lines before (l. 472) and not used anywhere else... (I didn't make a test case though, that's why I tagged it as "Task" rather than "Bug")

      I attached a patch, just in case.

      G.X

        Activity

        Hide
        Guilliam X added a comment - - edited

        Edited the patch with "branches/1.2" as root

        I can't provide a test case but they all run without failure after patching

        Show
        Guilliam X added a comment - - edited Edited the patch with "branches/1.2" as root I can't provide a test case but they all run without failure after patching
        Hide
        Guilliam X added a comment -

        Converted patch to Unix-like EOL style (was made on Windows...)

        Show
        Guilliam X added a comment - Converted patch to Unix-like EOL style (was made on Windows...)

          People

          • Assignee:
            Roman S. Borschel
            Reporter:
            Guilliam X
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: