sproutt / eussya-eussya-api

개발자 동기부여 서비스 플랫폼 '으쌰으쌰'
20 stars 1 forks source link

boiler plate code 생성 (#1) #8

Closed hyukjin-lee closed 4 years ago

hyukjin-lee commented 4 years ago

boiler plate code 생성

Bellroute commented 4 years ago

엔티티명으로 user를 사용하면 db 예약어와 겹치게 되는 경우 문제가 생길 수도 있을 것 같습니다.

hyukjin-lee commented 4 years ago

관련 구체적 케이스나 참고 자료가 있을까요?

Bellroute commented 4 years ago

[DB별 예약어 목록] MySQL - https://dev.mysql.com/doc/refman/5.7/en/keywords.html Oracle - https://docs.oracle.com/database/121/SQLRF/ap_keywd001.htm#SQLRF55621 PostgreSQL - https://www.postgresql.org/docs/11/sql-keywords-appendix.html MSSQL - https://docs.microsoft.com/en-us/sql/t-sql/language-elements/reserved-keywords-transact-sql?view=sql-server-ver15

db 별로 다르긴 하지만 mysql의 경우 예약어를 테이블명으로 사용하고자 한다면 해당 필드명을 ``로 묶어주면 된다고 합니다.

hyukjin-lee commented 4 years ago

해당 브랜치에 직접 커밋 하시고 push 해주시면 될 것 같습니다

Bellroute commented 4 years ago

User 대신 다른걸로 바꾸는건가요 아니면 user로 하는건가요? 후자인 경우에는 안해봐서 @Table(name= user)로 해놓고 한번 테스트해봐야할 것 같습니다

jbj616 commented 4 years ago

mysql에서 말하는 User가 msyql 계정을 뜻하는 것같아요