Spring

Spring - JPA 에러 Unable to locate Attribute with the the given name on this ManagedType

codeManager 2022. 5. 26. 19:31
반응형
Unable to locate Attribute  with the the given name  on this ManagedType

 

JPA 쿼리에서 이런 에러가 발생하는 경우가 있다.

 

이 경우에는 

 

public class PersonEntity {
    @Column(name = "id")
    private Long id;

}

column 명인 id 를 다르게 쓴 경우에 발생한다. (ex. "ID"로 쓰거나 "Id" 로 쓴 경우)

 

쿼리의 column명을 확인해주면 된다.

반응형