🔗 JPA

[JPA] No Property 메소드명 found 에러 해결방법 (No property 'xx' found for type 'x')

비타민찌 2022. 10. 1. 01:46
728x90

No property 'xx' found for type 'x'

 

Repository에 만들어둔 메소드명이 Entity에 존재하지 않기 때문에 사용할 수 없다는 에러.

메서드 명 종류가 꽤 많기 때문에 전체 리스트는 아래 링크를 참조해서 고치면 된다.

https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#repository-query-keywords

 

Spring Data JPA - Reference Documentation

Example 109. Using @Transactional at query methods @Transactional(readOnly = true) interface UserRepository extends JpaRepository { List findByLastname(String lastname); @Modifying @Transactional @Query("delete from User u where u.active = false") void del

docs.spring.io

 

뒤이어 나오는 문구 Did you mean 'Entity에_있는_컬럼명'으로 인텔리제이가 오타나 실수를 정정해서 다시 물어봐준다..

 

 

728x90