RED-6310: Changed element-collection fetch to eager because lazy loading runs into timing based errors

This commit is contained in:
Viktor Seifert 2023-03-13 16:07:04 +01:00
parent b9345110aa
commit 18ee468ca1

View File

@ -6,6 +6,7 @@ import java.util.List;
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.Table;
@ -39,11 +40,11 @@ public class NotificationPreferencesEntity {
@Column
private EmailNotificationType emailNotificationType;
@ElementCollection
@ElementCollection(fetch = FetchType.EAGER)
@Fetch(FetchMode.SUBSELECT)
private List<String> emailNotifications = new ArrayList<>();
@ElementCollection
@ElementCollection(fetch = FetchType.EAGER)
@Fetch(FetchMode.SUBSELECT)
private List<String> inAppNotifications = new ArrayList<>();