Skip to content

Update doctrine.rst #8949

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

Merged
merged 1 commit into from
Jan 2, 2018
Merged

Update doctrine.rst #8949

merged 1 commit into from
Jan 2, 2018

Conversation

MarcusSchwarz
Copy link
Contributor

Fixes two minor issues in code examples

Fixes two minor issues in code examples
@@ -654,6 +654,8 @@ In addition to the query builder, you can also query with `Doctrine Query Langua

public function findAllGreaterThanPrice($price): array
{
$em = $this->getEntityManager();

$query = $em->createQuery(
Copy link
Member

Choose a reason for hiding this comment

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

I think we could just use $this->_em here instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if this is a good idea, since $this->_em has never been introduced before. Without you mentioning it I wouldn't know it existed. The other code example in the same section doesn't use it as well.

Copy link
Member

Choose a reason for hiding this comment

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

That's true! And in the example below, we use $conn = $this->getEntityManager()->getConnection();

Copy link
Member

Choose a reason for hiding this comment

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

Let's merge this "as is" ... and later we can think of explaining $this->_em somewhere and using it in all examples.

@xabbuh xabbuh added this to the 4.0 milestone Jan 1, 2018
Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

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

@MarcusSchwarz well spotted! Thanks.

@javiereguiluz
Copy link
Member

Thanks Marcus.

@javiereguiluz javiereguiluz merged commit 4e10bdd into symfony:4.0 Jan 2, 2018
javiereguiluz added a commit that referenced this pull request Jan 2, 2018
This PR was merged into the 4.0 branch.

Discussion
----------

Update doctrine.rst

Fixes two minor issues in code examples

Commits
-------

4e10bdd Update doctrine.rst
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