Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-567

Foreign Key to Unique Field Update Failure

    Details

    • Type: New Feature New Feature
    • Status: Reopened
    • Priority: Trivial Trivial
    • Resolution: Unresolved
    • Affects Version/s: 2.0-BETA2
    • Fix Version/s: None
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      I am getting an error: 'Notice: Undefined index: sysname in ./libraries/Doctrine/ORM/Persisters/BasicEntityPersister.php on line 434' when I try to flush a change to a property that references a unique field on another object.

      From poking around in the _prepareUpdateData function, it seems that it only allows you to use identifier fields:

      $newValId = $uow->getEntityIdentifier($newVal);
      
      ..
      
      $result[$owningTable][$sourceColumn] = $newValId[$targetClass->fieldNames[$targetColumn]];
      

      I'll see if I can get a test case for this set up.

        Activity

          People

          • Assignee:
            Roman S. Borschel
            Reporter:
            Michael Ridgway
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: