Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JPQL 컴파일 에러 잡는 여부 (feat . QueryDSL) #86

Closed
myway00 opened this issue Apr 27, 2022 · 3 comments
Closed

JPQL 컴파일 에러 잡는 여부 (feat . QueryDSL) #86

myway00 opened this issue Apr 27, 2022 · 3 comments

Comments

@myway00
Copy link
Contributor

myway00 commented Apr 27, 2022

@yoon-youngjin 님께서 공유해주신 의문사항

1) @query (JPQL)

image
image

  • where -> wheree 로 오타를 내더라도 단순 typo 에러로만 나타남, 컴파일 에러는 X (run 누르면 돌아감)

2) QueryDSL

image
image

  • compile 에러로 확실하게 나타내줌, run 누르면 안 돌아감
@yoon-youngjin
Copy link
Collaborator

yoon-youngjin commented Apr 27, 2022

감사합니다 : )
JPQL 사용하는 경우에 오타가 난 뒤에 run을 하면 서버가 켜지나요?

@myway00
Copy link
Contributor Author

myway00 commented Apr 27, 2022

서버가 잠깐 켜졌다가, 바로 쿼리 생산할 수 없다는 에러로 꺼져버리긴 합니다..! 😂 이걸 켜졌다고 봐야할까요..?? ㅋㅋㅋㅋ 애매하네욥 ..!!

반면 QueryDSL 은 run 조차도 되지 않구요!!

결국 책에서 말씀 하신 것처럼 run 돌려보기 전까지는 JPQL은 에러가 났는지 여부를 알 수 없는 것은 확실하네요!

  1. JPQL
    1-1 ) Tomcat 구동까진 가능
    image
    1-2) 그렇지만 곧바로 QuerySyntaxException 으로 종료돼버림
    image
    image

  2. QueryDSL - Run 실행 시
    image

@myway00 myway00 pinned this issue Apr 27, 2022
@myway00 myway00 unpinned this issue Apr 27, 2022
@yoon-youngjin
Copy link
Collaborator

감사합니다 !!!

@myway00 myway00 closed this as completed May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants