Skip to content

Commit

Permalink
Mark subscribers association as extra lazy. (#306)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
xh3n1 committed Jun 4, 2019
1 parent c6e2cbd commit 066d643
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Domain/Model/Messaging/SubscriberList.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ class SubscriberList implements DomainModel, Identity, CreationDate, Modificatio
* @var Collection
* @Mapping\ManyToMany(
* targetEntity="PhpList\Core\Domain\Model\Subscription\Subscriber",
* inversedBy="subscribedLists"
* inversedBy="subscribedLists",
* fetch="EXTRA_LAZY"
* )
* @Mapping\JoinTable(name="phplist_listuser",
* joinColumns={@Mapping\JoinColumn(name="listid")},
Expand Down

0 comments on commit 066d643

Please sign in to comment.