From 66d29c343ea0a4c6ab2980284602a8cf7596174e Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 2 Aug 2024 18:02:43 +0100 Subject: [PATCH] api: fix mongo indexes --- API/src/main/java/cc/fascinated/model/score/Score.java | 2 ++ API/src/main/java/cc/fascinated/repository/ScoreRepository.java | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/API/src/main/java/cc/fascinated/model/score/Score.java b/API/src/main/java/cc/fascinated/model/score/Score.java index f8b2930..757cf27 100644 --- a/API/src/main/java/cc/fascinated/model/score/Score.java +++ b/API/src/main/java/cc/fascinated/model/score/Score.java @@ -7,6 +7,7 @@ import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; import org.springframework.data.annotation.Id; +import org.springframework.data.annotation.Reference; import org.springframework.data.mongodb.core.index.Indexed; import org.springframework.data.mongodb.core.mapping.Document; @@ -102,6 +103,7 @@ public class Score { /** * The score history for map the score was set on. */ + @Reference private List previousScores; /** diff --git a/API/src/main/java/cc/fascinated/repository/ScoreRepository.java b/API/src/main/java/cc/fascinated/repository/ScoreRepository.java index 1dcc19c..c9eb5b2 100644 --- a/API/src/main/java/cc/fascinated/repository/ScoreRepository.java +++ b/API/src/main/java/cc/fascinated/repository/ScoreRepository.java @@ -13,7 +13,6 @@ import java.util.List; * @author Fascinated (fascinated7) */ public interface ScoreRepository extends MongoRepository { - /** * Gets the top ranked scores from the platform. *