diff --git a/src/main/java/cc/fascinated/bat/model/BatGuild.java b/src/main/java/cc/fascinated/bat/model/BatGuild.java index 8b886a5..e8c8031 100644 --- a/src/main/java/cc/fascinated/bat/model/BatGuild.java +++ b/src/main/java/cc/fascinated/bat/model/BatGuild.java @@ -158,7 +158,7 @@ public class BatGuild extends ProfileHolder { document.put("_id", id); document.put("createdAt", createdAt); - Map profileDocuments = new HashMap<>(); + Map profileDocuments = this.document.get("profiles", new HashMap<>()); for (Serializable profile : getProfiles().values()) { profileDocuments.put(profile.getClass().getSimpleName(), profile.serialize(BatApplication.GSON)); } diff --git a/src/main/java/cc/fascinated/bat/model/BatUser.java b/src/main/java/cc/fascinated/bat/model/BatUser.java index 83e10a2..bb887fd 100644 --- a/src/main/java/cc/fascinated/bat/model/BatUser.java +++ b/src/main/java/cc/fascinated/bat/model/BatUser.java @@ -113,7 +113,7 @@ public class BatUser extends ProfileHolder { document.put("_id", id); document.put("createdAt", createdAt); - Map profileDocuments = new HashMap<>(); + Map profileDocuments = this.document.get("profiles", new HashMap<>()); for (Serializable profile : getProfiles().values()) { profileDocuments.put(profile.getClass().getSimpleName(), profile.serialize(BatApplication.GSON)); }