[PR #712] [CLOSED] Extra lazy get for inverse side of many-to-many #8593

Closed
opened 2026-01-22 16:00:40 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/712
Author: @sandermarechal
Created: 7/1/2013
Status: Closed

Base: masterHead: extra-lazy-get-manytomany


📝 Commits (1)

  • 9d10ea7 Extra lazy get for inverse side of many-to-many

📊 Changes

3 files changed (+45 additions, -1 deletions)

View changed files

📝 lib/Doctrine/ORM/PersistentCollection.php (+1 -1)
📝 lib/Doctrine/ORM/Persisters/ManyToManyPersister.php (+22 -0)
📝 tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php (+22 -0)

📄 Description

This is the cange requested by @stof and @beberlei in PR #710. It implements an extra lazy get on the working side of the relationship. As mentioned in #710 the unit tests fails for reasons I don't quite understand. The error I get is:

1) Doctrine\Tests\ORM\Functional\ExtraLazyCollectionTest::testGetIndexByManyToMany
Exception: [PHPUnit_Framework_Error_Notice] Undefined index: joinColumns

Trace:
/home/sander/src/doctrine2/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php:1665
/home/sander/src/doctrine2/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php:1610
/home/sander/src/doctrine2/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php:1701
/home/sander/src/doctrine2/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php:1115
/home/sander/src/doctrine2/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php:746
/home/sander/src/doctrine2/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php:55
/home/sander/src/doctrine2/lib/Doctrine/ORM/PersistentCollection.php:529
/home/sander/src/doctrine2/tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php:578

If someone with a little more understanding of the Doctrine internals can help me fix this, then we could restore some of the functionality that PR #710 had to remove.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/712 **Author:** [@sandermarechal](https://github.com/sandermarechal) **Created:** 7/1/2013 **Status:** ❌ Closed **Base:** `master` ← **Head:** `extra-lazy-get-manytomany` --- ### 📝 Commits (1) - [`9d10ea7`](https://github.com/doctrine/orm/commit/9d10ea7bc870ffd59e5e2710ea63fde8cafb661a) Extra lazy get for inverse side of many-to-many ### 📊 Changes **3 files changed** (+45 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/PersistentCollection.php` (+1 -1) 📝 `lib/Doctrine/ORM/Persisters/ManyToManyPersister.php` (+22 -0) 📝 `tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php` (+22 -0) </details> ### 📄 Description This is the cange requested by @stof and @beberlei in PR #710. It implements an extra lazy get on the working side of the relationship. As mentioned in #710 the unit tests fails for reasons I don't quite understand. The error I get is: ``` 1) Doctrine\Tests\ORM\Functional\ExtraLazyCollectionTest::testGetIndexByManyToMany Exception: [PHPUnit_Framework_Error_Notice] Undefined index: joinColumns Trace: /home/sander/src/doctrine2/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php:1665 /home/sander/src/doctrine2/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php:1610 /home/sander/src/doctrine2/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php:1701 /home/sander/src/doctrine2/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php:1115 /home/sander/src/doctrine2/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php:746 /home/sander/src/doctrine2/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php:55 /home/sander/src/doctrine2/lib/Doctrine/ORM/PersistentCollection.php:529 /home/sander/src/doctrine2/tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php:578 ``` If someone with a little more understanding of the Doctrine internals can help me fix this, then we could restore some of the functionality that PR #710 had to remove. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 16:00:40 +01:00
admin closed this issue 2026-01-22 16:00:41 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#8593