[PR #268] [MERGED] Add support for paginating WHERE NOT ... queries #7945

Open
opened 2026-01-22 15:57:40 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/268
Author: @sandermarechal
Created: 1/23/2012
Status: Merged
Merged: 1/23/2012
Merged by: @beberlei

Base: masterHead: paginate-where-not


📝 Commits (2)

  • 5dc0081 Add support for paginating WHERE NOT ... queries
  • c6c82ef Fixed indentation

📊 Changes

2 files changed (+17 additions, -1 deletions)

View changed files

📝 lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php (+3 -1)
📝 tests/Doctrine/Tests/ORM/Tools/Pagination/WhereInWalkerTest.php (+14 -0)

📄 Description

The Pagination tool throws an exception on a DQL query like:

SELECT u FROM User u WHERE NOT (u INSTANCE OF Person)

This is because Paginate does not know about the
Doctrine\ORM\Query\AST\ConditionalFactor which implements the NOT
operator. This patch adds support for that.

Ported from beberlei/DoctrineExtentions as requested by @beberlei in PR#52


🔄 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/268 **Author:** [@sandermarechal](https://github.com/sandermarechal) **Created:** 1/23/2012 **Status:** ✅ Merged **Merged:** 1/23/2012 **Merged by:** [@beberlei](https://github.com/beberlei) **Base:** `master` ← **Head:** `paginate-where-not` --- ### 📝 Commits (2) - [`5dc0081`](https://github.com/doctrine/orm/commit/5dc0081f563f0b05ac3fbae4d23ee7bca5925cfd) Add support for paginating WHERE NOT ... queries - [`c6c82ef`](https://github.com/doctrine/orm/commit/c6c82efe07438c5f38b76251a7ecfb0cc47c5e44) Fixed indentation ### 📊 Changes **2 files changed** (+17 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php` (+3 -1) 📝 `tests/Doctrine/Tests/ORM/Tools/Pagination/WhereInWalkerTest.php` (+14 -0) </details> ### 📄 Description The Pagination tool throws an exception on a DQL query like: SELECT u FROM User u WHERE NOT (u INSTANCE OF Person) This is because Paginate does not know about the Doctrine\ORM\Query\AST\ConditionalFactor which implements the NOT operator. This patch adds support for that. Ported from beberlei/DoctrineExtentions as requested by @beberlei in PR#52 --- <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 15:57:40 +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#7945