Skip to content

Loading…

DDC-542: ManyToMany with Properties sharing Join columns with PRimary Key #5050

Closed
doctrinebot opened this Issue · 7 comments

1 participant

@doctrinebot

Jira issue originally created by user @beberlei:

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
@doctrinebot

Comment created by @beberlei:

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
@doctrinebot

Comment created by romanb:

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

@doctrinebot

Comment created by romanb:

Pushing back.

@doctrinebot

Comment created by romanb:

This works now after the latest patches.

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added this to the 2.0-BETA4 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.