mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-16 08:56:04 +01:00
Morphia call fixes; add @Entity to more classes
1. During the conversion of Morphia calls to the new API, some of the `Filter.eq()` calls had their `field` set to `playerId` due to a copy/paste typo. 2. Morphia 2 switches to the codec system, so anything that will be serialized in the pipeline requires the `@Entity` annotation.
This commit is contained in:
@@ -139,7 +139,7 @@ public final class DatabaseHelper {
|
||||
}
|
||||
|
||||
public static List<GenshinAvatar> getAvatars(GenshinPlayer player) {
|
||||
return DatabaseManager.getDatastore().find(GenshinAvatar.class).filter(Filters.eq("playerId", player.getUid())).stream().toList();
|
||||
return DatabaseManager.getDatastore().find(GenshinAvatar.class).filter(Filters.eq("ownerId", player.getUid())).stream().toList();
|
||||
}
|
||||
|
||||
public static void saveItem(GenshinItem item) {
|
||||
@@ -155,7 +155,7 @@ public final class DatabaseHelper {
|
||||
return DatabaseManager.getDatastore().find(GenshinItem.class).filter(Filters.eq("ownerId", player.getUid())).stream().toList();
|
||||
}
|
||||
public static List<Friendship> getFriends(GenshinPlayer player) {
|
||||
return DatabaseManager.getDatastore().find(Friendship.class).filter(Filters.eq("playerId", player.getUid())).stream().toList();
|
||||
return DatabaseManager.getDatastore().find(Friendship.class).filter(Filters.eq("ownerId", player.getUid())).stream().toList();
|
||||
}
|
||||
|
||||
public static List<Friendship> getReverseFriends(GenshinPlayer player) {
|
||||
|
||||
Reference in New Issue
Block a user