Notice
Recent Posts
Recent Comments
250x250
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 31 |
Tags
- 문서
- SpringBoot
- Open Source
- PostgreSQL
- Exception
- myBatis
- Source
- git
- Thymeleaf
- MySQL
- AJAX
- spring
- 오픈소스
- Tomcat
- Core Java
- JDBC
- error
- Docker
- 설정
- MSSQL
- JavaScript
- STS
- ubuntu
- IntelliJ
- jpa
- maven
- oracle
- Python
- Spring Boot
- Eclipse
Archives
- Today
- Total
헤르메스 LIFE
[Error] The return type is incompatible with Persistable<String>.getId() 본문
Exception
[Error] The return type is incompatible with Persistable<String>.getId()
헤르메스의날개 2023. 4. 19. 23:32728x90
아래와 같은 오류가 발생했습니다.
The return type is incompatible with Persistable<String>.getId()
내용은 getId() 의 ID 의 Return Type이 String 이기 때문에 발생하는 오류입니다. ( ID의 Type은 Long 형입니다. )
Persistable 는 Spring Data JPA 구현 시 Merge 가 발생하는 문제를 해결하기 위해 사용하는 방법입니다.
https://hermeslog.tistory.com/693
[JPA] JPA Data Save 시 Select 쿼리가 먼저 실행 된다.
요즘 JPA를 공부하고 있습니다. MyBatis 만 하다가, 개인적으로 공부를 진행하고 있습니다. 하다보니 막히고, 이해가 안되는 부분이 많네요. 그때마다 검색과 삽질로 해결하고 있습니다. 여기 그 삽
hermeslog.tistory.com
저의 경우 해결 방법은 아래와 같습니다.
public abstract class BaseEntity implements Serializable, Persistable<String>
아래와 같이 변경합니다.
public abstract class BaseEntity implements Serializable, Persistable<Long>
728x90
