Skip to content

Conversation

@franzholz
Copy link
Contributor

The RestrictionBuilder should be mentioned on the top. It is used for every SQL query by default.

franzholz and others added 5 commits November 4, 2025 10:20
The RestrictionBuilder should be mentioned on the top. It is used for every SQL query by default.
Clarified the note about RestrictionBuilder's default restrictions in select queries.
See 
https://symfonycasts.com/screencast/doctrine-queries/and-where-or-where

andWhere() vs where()
What's wrong with ->where()? Well, if you added a WHERE clause to your QueryBuilder earlier, calling ->where() would remove that and replace it with the new stuff... which probably isn't what you want. ->andWhere() always adds to the query.
I have found another NOTE which explains the default restrictions. I have merged 2 NOTE boxes.
Releases: main
Copy link
Contributor

@sarahmccarthy123 sarahmccarthy123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :-) Just added a few language corrections

@franzholz
Copy link
Contributor Author

Add my latest change!

@linawolf
Copy link
Member

@franzholz conflicts need to be resolved

I add an additional link name, because it is a default restriction. This topic has not been called select restriction in the past, I guess.
@linawolf linawolf added the backport 13.4 Backport to TYPO3v13 label Nov 30, 2025
@linawolf linawolf merged commit 1f12b90 into TYPO3-Documentation:main Nov 30, 2025
6 checks passed
@github-actions
Copy link
Contributor

The backport to 13.4 failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply 21d9dcc12... [DOCS] Language checks
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config set advice.mergeConflict false"

stdout
Auto-merging Documentation/ApiOverview/Database/DoctrineDbal/QueryBuilder/Index.rst
[backport-6167-to-13.4 766616716] Add notes about RestrictionBuilder
 Author: Franz Holzinger <[email protected]>
 Date: Tue Nov 4 10:20:35 2025 +0100
 1 file changed, 8 insertions(+), 2 deletions(-)
Auto-merging Documentation/ApiOverview/Database/DoctrineDbal/QueryBuilder/Index.rst
[backport-6167-to-13.4 35b54644e] restrictions by default only with SELECT queries
 Author: Franz Holzinger <[email protected]>
 Date: Tue Nov 4 16:44:03 2025 +0100
 1 file changed, 2 insertions(+), 1 deletion(-)
Auto-merging Documentation/ApiOverview/Database/DoctrineDbal/QueryBuilder/Index.rst
[backport-6167-to-13.4 4b39043e3] better explanation for `->where()`
 Author: Franz Holzinger <[email protected]>
 Date: Thu Nov 6 20:35:01 2025 +0100
 1 file changed, 2 insertions(+), 4 deletions(-)
Auto-merging Documentation/ApiOverview/Database/DoctrineDbal/QueryBuilder/Index.rst
[backport-6167-to-13.4 0d4bd8f76] make the SELECT default restrictions findable
 Author: Franz Holzinger <[email protected]>
 Date: Sat Nov 8 13:58:41 2025 +0100
 1 file changed, 11 insertions(+), 14 deletions(-)
Auto-merging Documentation/ApiOverview/Database/DoctrineDbal/QueryBuilder/Index.rst
CONFLICT (content): Merge conflict in Documentation/ApiOverview/Database/DoctrineDbal/QueryBuilder/Index.rst

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-13.4 13.4
# Navigate to the new working tree
cd .worktrees/backport-13.4
# Create a new branch
git switch --create backport-6167-to-13.4
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick a9f4d26b2193b564bbd679d97b7f6eabef0cbd3b,77e5097df2bfae2845035c36f4b9a6cf6b5040c5,bd63037a2d57ee83f0ba6f4ff4a1d3c1bd82f5f2,e85635dde1137ad0bfd72adf7abafc172c2395cc,21d9dcc127ef46bda96fe1db98e747088eda8d1f,14b66debf6d2a520aff95fe09908d89612360705,b2feb1e895012296a53598612719213ac093e8c4,d0a7580e5a1b5dbfdaa73306222e81b7319124c4,5cd711976adb55a8bc7b8f2c0c8bf7c43d17c8b1
# Push it to GitHub
git push --set-upstream origin backport-6167-to-13.4
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-13.4

Then, create a pull request where the base branch is 13.4 and the compare/head branch is backport-6167-to-13.4.

linawolf added a commit that referenced this pull request Nov 30, 2025
* Add notes about RestrictionBuilder

The RestrictionBuilder should be mentioned on the top. It is used for every SQL query by default.

* restrictions by default only with SELECT queries

Clarified the note about RestrictionBuilder's default restrictions in select queries.

* better explanation for `->where()`

See
https://symfonycasts.com/screencast/doctrine-queries/and-where-or-where

andWhere() vs where()
What's wrong with ->where()? Well, if you added a WHERE clause to your QueryBuilder earlier, calling ->where() would remove that and replace it with the new stuff... which probably isn't what you want. ->andWhere() always adds to the query.

* make the SELECT default restrictions findable

I have found another NOTE which explains the default restrictions. I have merged 2 NOTE boxes.

* [DOCS] Language checks

Releases: main

* are defined

* Apply suggestion from @linawolf

* Add default restrictions link name

I add an additional link name, because it is a default restriction. This topic has not been called select restriction in the past, I guess.

---------

Co-authored-by: Sarah McCarthy <[email protected]>
Co-authored-by: Lina Wolf <[email protected]>
(cherry picked from commit 1f12b90)
@franzholz franzholz deleted the patch-61 branch November 30, 2025 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 13.4 Backport to TYPO3v13 backport-done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants