Skip to content

Commit

Permalink
Replace "Blacklist" with "Banlist" in join example (#8175)
Browse files Browse the repository at this point in the history
  • Loading branch information
albe authored Jun 9, 2020
1 parent 01de90c commit 2a98a98
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions docs/en/reference/dql-doctrine-query-language.rst
Original file line number Diff line number Diff line change
Expand Up @@ -529,26 +529,26 @@ Joins between entities without associations were not possible until version
.. code-block:: php
<?php
$query = $em->createQuery('SELECT u FROM User u JOIN Blacklist b WITH u.email = b.email');
$query = $em->createQuery('SELECT u FROM User u JOIN Banlist b WITH u.email = b.email');
With an arbitrary join the result differs from the joins using a mapped property.
The result of an arbitrary join is an one dimensional array with a mix of the entity from the ``SELECT``
and the joined entity fitting to the filtering of the query. In case of the example with ``User``
and ``Blacklist``, it can look like this:
and ``Banlist``, it can look like this:

- User
- Blacklist
- Blacklist
- Banlist
- Banlist
- User
- Blacklist
- Banlist
- User
- Blacklist
- Blacklist
- Blacklist
- Banlist
- Banlist
- Banlist

In this form of join, the ``Blacklist`` entities found by the filtering in the ``WITH`` part are not fetched by an accessor
method on ``User``, but are already part of the result. In case the accessor method for Blacklists is invoked on a User instance,
it loads all the related ``Blacklist`` objects corresponding to this ``User``. This change of behaviour needs to be considered
In this form of join, the ``Banlist`` entities found by the filtering in the ``WITH`` part are not fetched by an accessor
method on ``User``, but are already part of the result. In case the accessor method for Banlists is invoked on a User instance,
it loads all the related ``Banlist`` objects corresponding to this ``User``. This change of behaviour needs to be considered
when the DQL is switched to an arbitrary join.

.. note::
Expand Down

0 comments on commit 2a98a98

Please sign in to comment.