Doctrine 1
  1. Doctrine 1
  2. DC-510

setColumnOption(s) doesn't update _identifier when setting column as primary (symfony 1.4.2)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.1
    • Fix Version/s: 1.2.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      symfony 1.4.2

      Description

      class PlgSlide extends BasePlgSlide
      {
      public function setTableDefinition()

      { parent::setTableDefinition(); $this->setColumnOptions('domain_id', array('primary' => true)); }

      ...
      doesn't work, domain_id field is not added as part of identifier for PlgSlide table records


      class PlgSlide extends BasePlgSlide
      {
      public function setTableDefinition()

      { parent::setTableDefinition(); $this->hasColumn('domain_id', 'integer', 4, array( .... other field option options here 'primary' => true )); }

      do work as expected.

      I've made some investigation and found code fragment at Table.php, in function setColumn, line 1373:
      if (isset($options['primary']) && $options['primary']) {
      ...
      $this->_identifier = (array) $this->_identifier;

      but no such functionality for setColumnOption function, Table.php, line 1235

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Vladimir Droznik
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: