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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant