diff --git a/backend/src/main/java/com/festago/stage/domain/StageQueryInfo.java b/backend/src/main/java/com/festago/stage/domain/StageQueryInfo.java index b3006979e..4f19e25d8 100644 --- a/backend/src/main/java/com/festago/stage/domain/StageQueryInfo.java +++ b/backend/src/main/java/com/festago/stage/domain/StageQueryInfo.java @@ -1,5 +1,7 @@ package com.festago.stage.domain; +import static java.util.Comparator.comparingLong; + import com.festago.artist.domain.Artist; import com.festago.artist.domain.ArtistsSerializer; import jakarta.persistence.Column; @@ -40,7 +42,10 @@ public static StageQueryInfo of(Long stageId, List artists, ArtistsSeria } public void updateArtist(List artists, ArtistsSerializer serializer) { - this.artistInfo = serializer.serialize(artists); + List sortedArtists = artists.stream() + .sorted(comparingLong(Artist::getId)) + .toList(); + this.artistInfo = serializer.serialize(sortedArtists); } public Long getId() {