Skip to content

Commit

Permalink
SAK-40354 Lazy-load chat channel messages (sakaiproject#5814)
Browse files Browse the repository at this point in the history
So we don't have to get all of them from the database every time we get a channel object
  • Loading branch information
smarquard authored and jonespm committed Jul 23, 2018
1 parent 61f31c1 commit 7768cd2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public class ChatChannel implements org.sakaiproject.entity.api.Entity {
@Column(name = "ENABLE_USER_OVERRIDE", nullable = false)
private boolean enableUserOverride = true;

@OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval = true, mappedBy = "chatChannel")
@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true, mappedBy = "chatChannel")
@BatchSize(size = 50)
private Set<ChatMessage> messages;

Expand Down

0 comments on commit 7768cd2

Please sign in to comment.