From 7c24a55f963662097d3daf92658a6a509ee8df38 Mon Sep 17 00:00:00 2001 From: Lee Da-hyeon Date: Sun, 1 Dec 2024 03:12:04 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feature:=20chat=5Froom=5FId=20=EC=BB=AC?= =?UTF-8?q?=EB=9F=BC=EB=AA=85=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hyunsolution/dangu/chatting/domain/Chatting.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/hyunsolution/dangu/chatting/domain/Chatting.java b/src/main/java/com/hyunsolution/dangu/chatting/domain/Chatting.java index eb88b7b..530f862 100644 --- a/src/main/java/com/hyunsolution/dangu/chatting/domain/Chatting.java +++ b/src/main/java/com/hyunsolution/dangu/chatting/domain/Chatting.java @@ -27,7 +27,7 @@ public class Chatting extends BaseEntity { @ManyToOne(fetch = FetchType.LAZY) @JoinColumn( - name = "chatRoom_id", + name = "chat_room_id", nullable = false, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) private ChatRoom chatRoom; From 648c238dd87d7d09aceb799ff6081a583cdbc19f Mon Sep 17 00:00:00 2001 From: Lee Da-hyeon Date: Sun, 1 Dec 2024 03:12:21 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feature:=20chat=5Froom=5FId=20=EC=BB=AC?= =?UTF-8?q?=EB=9F=BC=EB=AA=85=20=EC=88=98=EC=A0=95=EC=82=AC=ED=95=AD=20?= =?UTF-8?q?=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hyunsolution/dangu/chatting/domain/ChattingRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/hyunsolution/dangu/chatting/domain/ChattingRepository.java b/src/main/java/com/hyunsolution/dangu/chatting/domain/ChattingRepository.java index 406c160..2706bc9 100644 --- a/src/main/java/com/hyunsolution/dangu/chatting/domain/ChattingRepository.java +++ b/src/main/java/com/hyunsolution/dangu/chatting/domain/ChattingRepository.java @@ -12,7 +12,7 @@ public interface ChattingRepository extends JpaRepository { @Query( value = "select c.content from chatting c where c.id = (" - + "select MAX(id) from chatting where chatRoom_Id = :chatRoomId)", + + "select MAX(id) from chatting where chat_room_Id = :chatRoomId)", nativeQuery = true) String findLastChattingContentByChatRoomId(Long chatRoomId); From 7b9af865fce950ef6a3431f5ce5e2100c5da5d40 Mon Sep 17 00:00:00 2001 From: Lee Da-hyeon Date: Sun, 1 Dec 2024 03:19:03 +0900 Subject: [PATCH 3/3] =?UTF-8?q?feature:=20chat=5Froom=5FId=20=EC=B9=BC?= =?UTF-8?q?=EB=9F=BC=EB=AA=85=20index=EC=97=90=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hyunsolution/dangu/chatting/domain/Chatting.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/hyunsolution/dangu/chatting/domain/Chatting.java b/src/main/java/com/hyunsolution/dangu/chatting/domain/Chatting.java index 530f862..0ab7793 100644 --- a/src/main/java/com/hyunsolution/dangu/chatting/domain/Chatting.java +++ b/src/main/java/com/hyunsolution/dangu/chatting/domain/Chatting.java @@ -18,7 +18,7 @@ @Getter @NoArgsConstructor(access = AccessLevel.PROTECTED) @EntityListeners(AuditingEntityListener.class) -@Table(indexes = {@Index(name = "idx_chatRoom_id_id", columnList = "chatRoom_id, id DESC")}) +@Table(indexes = {@Index(name = "idx_chat_room_id_id", columnList = "chat_room_id, id DESC")}) @DynamicInsert public class Chatting extends BaseEntity { @Id