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

Closed
opened 2026-01-22 12:46:15 +01:00 by admin · 7 comments
Owner

Originally created by @doctrinebot on GitHub (Apr 26, 2010).

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
Originally created by @doctrinebot on GitHub (Apr 26, 2010). 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 ```
admin added the Bug label 2026-01-22 12:46:15 +01:00
admin closed this issue 2026-01-22 12:46:15 +01:00
Author
Owner

@doctrinebot commented on GitHub (Apr 26, 2010):

@doctrinebot commented on GitHub (Apr 26, 2010): - is referenced by [DDC-436: Foreign keys on primary keys and vice versa](http://www.doctrine-project.org/jira/browse/DDC-436)
Author
Owner

@doctrinebot commented on GitHub (Apr 26, 2010):

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 commented on GitHub (Apr 26, 2010): 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 ```
Author
Owner

@doctrinebot commented on GitHub (Apr 26, 2010):

Comment created by romanb:

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

@doctrinebot commented on GitHub (Apr 26, 2010): Comment created by romanb: Scheduled for beta2 for now. May be pushed back later if we don't find the time.
Author
Owner

@doctrinebot commented on GitHub (May 23, 2010):

Comment created by romanb:

Pushing back.

@doctrinebot commented on GitHub (May 23, 2010): Comment created by romanb: Pushing back.
Author
Owner

@doctrinebot commented on GitHub (Aug 8, 2010):

Comment created by romanb:

This works now after the latest patches.

@doctrinebot commented on GitHub (Aug 8, 2010): Comment created by romanb: This works now after the latest patches.
Author
Owner

@doctrinebot commented on GitHub (Aug 8, 2010):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Aug 8, 2010): Issue was closed with resolution "Fixed"
Author
Owner

@doctrinebot commented on GitHub (Dec 13, 2015):

Imported 1 attachments from Jira into https://gist.github.com/fa1743b14ca2be4542ef

@doctrinebot commented on GitHub (Dec 13, 2015): Imported 1 attachments from Jira into https://gist.github.com/fa1743b14ca2be4542ef - [10587_Recipes.php](https://gist.github.com/fa1743b14ca2be4542ef#file-10587_Recipes-php)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#673