본문 바로가기

WEB BANK-END/SPRING

[Hibernate] java.lang.ClassCastException : org.hibernate.internal.QueryImpl은 com.models.User로 캐스트 될 수 없습니다. 해결법

stackoverflow.com/questions/38835878/java-lang-classcastexception-org-hibernate-internal-queryimpl-cannot-be-cast-to

 

java.lang.ClassCastException: org.hibernate.internal.QueryImpl cannot be cast to com.models.User

I have a user table structured this way id name email 1 cc cc@yahoo.com 2 rr rr@yahoo.com 3 cc cc@yahoo.com I am writing a query to save a log when ever it fi...

stackoverflow.com

uniqueResult()를 쓰자.