Skip to content

Commit 96d68b5

Browse files
xh3n1oliverklee
authored andcommitted
Mark subscribers association as extra lazy. (#306)
The "count" on the collection can be called without triggering a full load of the collection in the memory. Signed-off-by: Xheni Myrtaj <[email protected]>
1 parent c07f682 commit 96d68b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Domain/Model/Messaging/SubscriberList.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ class SubscriberList implements DomainModel, Identity, CreationDate, Modificatio
112112
* @var Collection
113113
* @Mapping\ManyToMany(
114114
* targetEntity="PhpList\Core\Domain\Model\Subscription\Subscriber",
115-
* inversedBy="subscribedLists"
115+
* inversedBy="subscribedLists",
116+
* fetch="EXTRA_LAZY"
116117
* )
117118
* @Mapping\JoinTable(name="phplist_listuser",
118119
* joinColumns={@Mapping\JoinColumn(name="listid")},

0 commit comments

Comments
 (0)