Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@ public interface DiaryRepository extends JpaRepository<Diary, Long> {
List<DailyEmotionCount> findDailyEmotions(User user, LocalDate start, LocalDate end);

@Query("""
SELECT d
FROM Diary d
JOIN d.type t
WHERE d.user = :user
AND d.date = :date
SELECT DISTINCT d
FROM Diary d
WHERE d.user = :user
AND d.date = :date
AND (:type IS NULL OR :type MEMBER OF d.type)
ORDER BY d.writtenAt DESC
""")
Expand Down
Loading