-
Notifications
You must be signed in to change notification settings - Fork 446
Add notes about RestrictionBuilder #6167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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
sarahmccarthy123
left a comment
There was a problem hiding this 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
|
Add my latest change! |
|
@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.
|
The backport to stderrstdoutTo 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.4Then, create a pull request where the |
* 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)
The RestrictionBuilder should be mentioned on the top. It is used for every SQL query by default.