Doctrine 1
  1. Doctrine 1
  2. DC-961

Copy uses mutators but does not use accessors

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.3
    • Fix Version/s: None
    • Component/s: Record
    • Labels:
      None

      Description

      I have a column that contains a serialized string of data. The accessor for that column unserializes the data and the mutator serializes. When calling copy the accessor is not used but the mutator is causing the mutator to fail because it receives a string instead of an object as its value.

      The lines of code creating this problem follow:

      Record.php
       public function copy($deep = false)
       {
          $data = $this->_data; //does not use accessor
      ...
          $ret = $this->_table->create($data); // does use mutator
      ...
      }
      

      I have currently patched my copy function with the following:

      // $data = $this->_data
      $data = $this->toArray(false);
      

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Paul Jones
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: