Skip to content
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

Place DQL in front of QueryBuilder #5302

Closed
wants to merge 3 commits into from
Closed

Place DQL in front of QueryBuilder #5302

wants to merge 3 commits into from

Conversation

alfonmga
Copy link

Q A
Doc fix? yes
New docs? no
Applies to 2.7
Fixed tickets #5022

Querying for Objects with DQL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Instead of using the ``QueryBuilder``, you can alternatively write the queries
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should change this sentence. The reader doesn't know anything about the query builder yet when reading this paragraph.

Copy link
Member

Choose a reason for hiding this comment

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

How about this. The first part is copied from the QueryBuilder section:

Imagine that you want to query for products, but only return products that
cost more than ``19.99``, ordered from cheapest to most expensive. You can use
Doctrine's native SQL-like language called DQL to do query for this::

Then, the first sentence under Querying for Objects Using Doctrine's Query Builder should change to be something like:

Instead of writing a DQL string, you can alternatively use a helpful object called
the ``QueryBuilder`` to build that string for you::

Copy link
Author

Choose a reason for hiding this comment

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

👍

Copy link
Member

Choose a reason for hiding this comment

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

@alfonsomga I think @weaverryan's proposal is really nice.

@xabbuh
Copy link
Member

xabbuh commented May 23, 2015

Thank you for your first contribution @alfonsomga. Really nice work! I just left one minor comment about a sentence that we should rewrite a bit I think.

@alfonmga
Copy link
Author

Thank you for your comment.
Can you help me with that sentence? thanks!

@xabbuh
Copy link
Member

xabbuh commented May 23, 2015

👍

weaverryan added a commit that referenced this pull request May 25, 2015
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #5302).

Discussion
----------

Place DQL in front of QueryBuilder

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.7
| Fixed tickets | #5022

Commits
-------

2335206 Update doctrine.rst
ce9456c Place DQL in front of QueryBuilder
weaverryan added a commit that referenced this pull request May 25, 2015
…gs that did not make sense anymore

Also, adding some extra code blocks to show how to query for one result
@weaverryan
Copy link
Member

Excellent! I've merged this into the 2.3 branch. I also made one more commit afterwards, with a few wordings that didn't make sense with the new ordering (and a few other additions). See sha: 7e7020d. If you see any issues at all with that commit, please let me know!

Thanks Alfonso!

@weaverryan weaverryan closed this May 25, 2015
weaverryan added a commit that referenced this pull request May 25, 2015
* 2.3:
  Adding one more note about why we're in config.yml
  [#5302] Re-reading sections after moving them, and tweaking some things that did not make sense anymore
  Update doctrine.rst
  Place DQL in front of QueryBuilder
  Slight re-wording of new paragraph with the goal of being as short as possible
  Fix formatting error
  Created a new section for rotating log files and explained the max_files configuration option
  Fixes after review
  Applied comments
  [BestPractices] restructured text format for the installation instructions template
  Fix typo
  Added new recipe on upgrading a major version
  Fix little title case mistake
  Created 'upgrade' cookbook section
  Added XML and PHP configuration samples
  Added a note about the rotating_file monolog handler
  Changing back to config.yml and fixing some code block mistakes thanks to Wouter
  Making the channel handler more useful by showing it on the prod environment
weaverryan added a commit that referenced this pull request May 25, 2015
* 2.6:
  Adding one more note about why we're in config.yml
  [#5302] Re-reading sections after moving them, and tweaking some things that did not make sense anymore
  Update doctrine.rst
  Place DQL in front of QueryBuilder
  Slight re-wording of new paragraph with the goal of being as short as possible
  Fix formatting error
  Created a new section for rotating log files and explained the max_files configuration option
  Fixes after review
  Changed comment from # to //
  Applied comments
  [BestPractices] restructured text format for the installation instructions template
  Better illustrate what the "user mistake" is.
  Fix typo
  Added new recipe on upgrading a major version
  Fix little title case mistake
  Created 'upgrade' cookbook section
  Added XML and PHP configuration samples
  Added a note about the rotating_file monolog handler
  Changing back to config.yml and fixing some code block mistakes thanks to Wouter
  Making the channel handler more useful by showing it on the prod environment
weaverryan added a commit that referenced this pull request May 25, 2015
* 2.8: (21 commits)
  Adding one more note about why we're in config.yml
  [#5302] Re-reading sections after moving them, and tweaking some things that did not make sense anymore
  Update doctrine.rst
  Place DQL in front of QueryBuilder
  Slight re-wording of new paragraph with the goal of being as short as possible
  Fix formatting error
  Created a new section for rotating log files and explained the max_files configuration option
  Fixes after review
  [VarDumper] Add doc for assertDump* assertions
  Changed comment from # to //
  Applied comments
  [BestPractices] restructured text format for the installation instructions template
  Better illustrate what the "user mistake" is.
  Fix typo
  Added new recipe on upgrading a major version
  Fix little title case mistake
  Created 'upgrade' cookbook section
  Added XML and PHP configuration samples
  Added a note about the rotating_file monolog handler
  Changing back to config.yml and fixing some code block mistakes thanks to Wouter
  ...
javiereguiluz pushed a commit to javiereguiluz/symfony-docs that referenced this pull request Sep 2, 2015
…me things that did not make sense anymore

Also, adding some extra code blocks to show how to query for one result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants