Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-542

ManyToMany with Properties sharing Join columns with PRimary Key

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-ALPHA4
    • Fix Version/s: 2.0-BETA4
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      Spagetthi with Tomatoes
      
      Notice: Undefined index: recipe_id in /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/UnitOfWork.php on line 1820
      
      Call Stack:
          0.0005     354964   1. {main}() /home/benny/code/php/wsnetbeans/DoctrineTests/ManyToMany/Recipes.php:0
          0.2063    4308460   2. Doctrine\ORM\PersistentCollection->getIterator() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/PersistentCollection.php:0
          0.2063    4308460   3. Doctrine\ORM\PersistentCollection->_initialize() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/PersistentCollection.php:512
          0.2064    4308460   4. Doctrine\ORM\Mapping\OneToManyMapping->load() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/PersistentCollection.php:210
          0.2064    4308820   5. Doctrine\ORM\Persisters\StandardEntityPersister->loadOneToManyCollection() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/Mapping/OneToManyMapping.php:137
          0.2371    4312216   6. Doctrine\ORM\Persisters\StandardEntityPersister->_createEntity() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php:559
          0.2372    4312720   7. Doctrine\ORM\UnitOfWork->createEntity() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php:611
      
      
      Notice: Undefined index: product_id in /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/UnitOfWork.php on line 1820
      
      Call Stack:
          0.0005     354964   1. {main}() /home/benny/code/php/wsnetbeans/DoctrineTests/ManyToMany/Recipes.php:0
          0.2063    4308460   2. Doctrine\ORM\PersistentCollection->getIterator() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/PersistentCollection.php:0
          0.2063    4308460   3. Doctrine\ORM\PersistentCollection->_initialize() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/PersistentCollection.php:512
          0.2064    4308460   4. Doctrine\ORM\Mapping\OneToManyMapping->load() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/PersistentCollection.php:210
          0.2064    4308820   5. Doctrine\ORM\Persisters\StandardEntityPersister->loadOneToManyCollection() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/Mapping/OneToManyMapping.php:137
          0.2371    4312216   6. Doctrine\ORM\Persisters\StandardEntityPersister->_createEntity() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php:559
          0.2372    4312720   7. Doctrine\ORM\UnitOfWork->createEntity() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php:611
      
      
      Notice: Undefined index: recipe_id in /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/UnitOfWork.php on line 1820
      
      Call Stack:
          0.0005     354964   1. {main}() /home/benny/code/php/wsnetbeans/DoctrineTests/ManyToMany/Recipes.php:0
          0.2063    4308460   2. Doctrine\ORM\PersistentCollection->getIterator() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/PersistentCollection.php:0
          0.2063    4308460   3. Doctrine\ORM\PersistentCollection->_initialize() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/PersistentCollection.php:512
          0.2064    4308460   4. Doctrine\ORM\Mapping\OneToManyMapping->load() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/PersistentCollection.php:210
          0.2064    4308820   5. Doctrine\ORM\Persisters\StandardEntityPersister->loadOneToManyCollection() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/Mapping/OneToManyMapping.php:137
          0.2382    4314316   6. Doctrine\ORM\Persisters\StandardEntityPersister->_createEntity() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php:559
          0.2383    4314820   7. Doctrine\ORM\UnitOfWork->createEntity() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php:611
      
      
      Notice: Undefined index: product_id in /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/UnitOfWork.php on line 1820
      
      Call Stack:
          0.0005     354964   1. {main}() /home/benny/code/php/wsnetbeans/DoctrineTests/ManyToMany/Recipes.php:0
          0.2063    4308460   2. Doctrine\ORM\PersistentCollection->getIterator() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/PersistentCollection.php:0
          0.2063    4308460   3. Doctrine\ORM\PersistentCollection->_initialize() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/PersistentCollection.php:512
          0.2064    4308460   4. Doctrine\ORM\Mapping\OneToManyMapping->load() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/PersistentCollection.php:210
          0.2064    4308820   5. Doctrine\ORM\Persisters\StandardEntityPersister->loadOneToManyCollection() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/Mapping/OneToManyMapping.php:137
          0.2382    4314316   6. Doctrine\ORM\Persisters\StandardEntityPersister->_createEntity() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php:559
          0.2383    4314820   7. Doctrine\ORM\UnitOfWork->createEntity() /home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php:611
      
      
      Notice: Trying to get property of non-object in /home/benny/code/php/wsnetbeans/DoctrineTests/ManyToMany/Recipes.php on line 176
      
      Call Stack:
          0.0005     354964   1. {main}() /home/benny/code/php/wsnetbeans/DoctrineTests/ManyToMany/Recipes.php:0
      
         100
      
      Notice: Trying to get property of non-object in /home/benny/code/php/wsnetbeans/DoctrineTests/ManyToMany/Recipes.php on line 176
      
      Call Stack:
          0.0005     354964   1. {main}() /home/benny/code/php/wsnetbeans/DoctrineTests/ManyToMany/Recipes.php:0
      
         5
      
      1. Recipes.php
        4 kB
        Benjamin Eberlei

        Issue Links

          Activity

          Hide
          Benjamin Eberlei added a comment -

          With DQL the second ingredient in the loop has an product of NULL:

          Spagetthi with Tomatoes
            Tomatoes 100
          
          Notice: Trying to get property of non-object in /home/benny/code/php/wsnetbeans/DoctrineTests/ManyToMany/Recipes.php on line 168
          
          Call Stack:
              0.0004     356008   1. {main}() /home/benny/code/php/wsnetbeans/DoctrineTests/ManyToMany/Recipes.php:0
          
             5
          
          Show
          Benjamin Eberlei added a comment - With DQL the second ingredient in the loop has an product of NULL: Spagetthi with Tomatoes Tomatoes 100 Notice: Trying to get property of non-object in /home/benny/code/php/wsnetbeans/DoctrineTests/ManyToMany/Recipes.php on line 168 Call Stack: 0.0004 356008 1. {main}() /home/benny/code/php/wsnetbeans/DoctrineTests/ManyToMany/Recipes.php:0 5
          Hide
          Roman S. Borschel added a comment -

          Scheduled for beta2 for now. May be pushed back later if we don't find the time.

          Show
          Roman S. Borschel added a comment - Scheduled for beta2 for now. May be pushed back later if we don't find the time.
          Hide
          Roman S. Borschel added a comment -

          Pushing back.

          Show
          Roman S. Borschel added a comment - Pushing back.
          Hide
          Roman S. Borschel added a comment -

          This works now after the latest patches.

          Show
          Roman S. Borschel added a comment - This works now after the latest patches.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: