Skip to content

Commit

Permalink
Document return-value substitution in EntityManager::transactional()
Browse files Browse the repository at this point in the history
  • Loading branch information
DHager committed Jul 16, 2015
1 parent 6bf6db3 commit 8503c12
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/en/reference/transactions-and-concurrency.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ functionally equivalent to the previously shown code looks as follows:
$em->persist($user);
});
.. warning::

For historical reasons, ``EntityManager#transactional($func)`` will return
``false`` whenever the return value of ``$func`` is loosely false.
Some examples of this include ``array()``, ``"0"``, ``""``, ``0``, and
``null``.

The difference between ``Connection#transactional($func)`` and
``EntityManager#transactional($func)`` is that the latter
abstraction flushes the ``EntityManager`` prior to transaction
Expand Down

0 comments on commit 8503c12

Please sign in to comment.