diff --git a/docs/en/reference/basic-mapping.rst b/docs/en/reference/basic-mapping.rst index 1cf1b16e3..cfd06cd24 100644 --- a/docs/en/reference/basic-mapping.rst +++ b/docs/en/reference/basic-mapping.rst @@ -524,10 +524,29 @@ according to the used database platform. .. warning:: Identifier Quoting does not work for join column names or discriminator - column names. + column names unless you are using a custom ``QuoteStrategy``. .. _reference-basic-mapping-custom-mapping-types: +.. versionadded: 2.3 + +For more control over column quoting the ``Doctrine\ORM\Mapping\QuoteStrategy`` interface +was introduced in 2.3. It is invoked for every column, table, alias and other +SQL names. You can implement the QuoteStrategy and set it by calling +``Doctrine\ORM\Configuration#setQuoteStrategy()``. + +.. versionadded: 2.4 + +The ANSI Quote Strategy was added, which assumes quoting is not necessary for any SQL name. +You can use it with the following code: + +.. code-block:: php + + setQuoteStrategy(new AnsiQuoteStrategy()); + Custom Mapping Types -------------------- diff --git a/docs/en/reference/dql-doctrine-query-language.rst b/docs/en/reference/dql-doctrine-query-language.rst index ec4907ec6..fd8fca430 100644 --- a/docs/en/reference/dql-doctrine-query-language.rst +++ b/docs/en/reference/dql-doctrine-query-language.rst @@ -427,6 +427,8 @@ Get all users visible on a given website that have chosen certain gender: createQuery('SELECT u FROM User u WHERE u.gender IN (SELECT IDENTITY(agl.gender) FROM Site s JOIN s.activeGenderList agl WHERE s.id = ?1)'); +.. versionadded:: 2.4 + Starting with 2.4, the IDENTITY() DQL function also works for composite primary keys: .. code-block:: php @@ -434,6 +436,13 @@ Starting with 2.4, the IDENTITY() DQL function also works for composite primary createQuery('SELECT IDENTITY(c.location, 'latitude') AS latitude, IDENTITY(c.location, 'longitude') AS longitude FROM Checkpoint c WHERE c.user = ?1'); +Joins between entities without associations were not possible until version +2.4, where you can generate an arbitrary join with the following syntax: + +.. code-block:: php + + createQuery('SELECT u FROM User u JOIN Blacklist b WITH u.email = b.email'); Partial Object Syntax ^^^^^^^^^^^^^^^^^^^^^ diff --git a/docs/en/reference/query-builder.rst b/docs/en/reference/query-builder.rst index b96e2dfe2..63f1a872a 100644 --- a/docs/en/reference/query-builder.rst +++ b/docs/en/reference/query-builder.rst @@ -433,6 +433,9 @@ complete list of supported helper methods available: // Example - $qb->expr()->like('u.firstname', $qb->expr()->literal('Gui%')) public function like($x, $y); // Returns Expr\Comparison instance + // Example - $qb->expr()->notLike('u.firstname', $qb->expr()->literal('Gui%')) + public function notLike($x, $y); // Returns Expr\Comparison instance + // Example - $qb->expr()->between('u.id', '1', '10') public function between($val, $x, $y); // Returns Expr\Func