From 0892a9c30c1b2bc07fa2b24721355b574615189c Mon Sep 17 00:00:00 2001 From: Albert Casademont Date: Wed, 13 Nov 2024 20:50:55 +0100 Subject: [PATCH 1/2] Add `isEmpty()` method to the Extra Lazy functions It was added a long tiem ago (see https://github.com/doctrine/orm/pull/912) but the `isEmpty()` function also does not trigger a full collection load. --- docs/en/tutorials/extra-lazy-associations.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/tutorials/extra-lazy-associations.rst b/docs/en/tutorials/extra-lazy-associations.rst index 4c31357eecc..3dd22faee35 100644 --- a/docs/en/tutorials/extra-lazy-associations.rst +++ b/docs/en/tutorials/extra-lazy-associations.rst @@ -19,6 +19,7 @@ can be called without triggering a full load of the collection: - ``Collection#count()`` - ``Collection#get($key)`` - ``Collection#slice($offset, $length = null)`` +- ``Collection#isEmpty()`` For each of the above methods the following semantics apply: From bdf7500e759c3c8caab39cde27bb748206883fd5 Mon Sep 17 00:00:00 2001 From: Albert Casademont Date: Wed, 13 Nov 2024 23:39:06 +0100 Subject: [PATCH 2/2] Update extra-lazy-associations.rst --- docs/en/tutorials/extra-lazy-associations.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/tutorials/extra-lazy-associations.rst b/docs/en/tutorials/extra-lazy-associations.rst index 3dd22faee35..90391e1b034 100644 --- a/docs/en/tutorials/extra-lazy-associations.rst +++ b/docs/en/tutorials/extra-lazy-associations.rst @@ -18,8 +18,8 @@ can be called without triggering a full load of the collection: - ``Collection#containsKey($key)`` - ``Collection#count()`` - ``Collection#get($key)`` -- ``Collection#slice($offset, $length = null)`` - ``Collection#isEmpty()`` +- ``Collection#slice($offset, $length = null)`` For each of the above methods the following semantics apply: