본문 바로가기

JPA7

[JPA/PostgreSQL] ERROR: function lower(bytea) does not exist 해결기 [JPA/PostgreSQL] ERROR: function lower(bytea) does not exist 해결기 — IS NULL 위치를 맨 뒤로PostgreSQL + Spring Data JPA 환경에서 아래와 같은 에러를 만난다면:org.postgresql.util.PSQLException: ERROR: function lower(bytea) does not exist대부분 LOWER(:param)가 bytea로 추론되어 발생한 문제입니다.저는 is null 조건을 가장 마지막으로 이동해 해결했습니다. 이 글에서는 증상 → 원인 → 해결 → 대안 순서로 정리합니다. (참고 링크 포함)증상다음과 같은 JPQL/Repository 쿼리를 사용할 때 발생합니다:@Query("""SELECT eFROM .. 2025. 9. 23.
[Spring/Error] No serializer found for class 오류 : No serializer found for class ... and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) Serialize : Object to JSON Deserialize : JSON to Object the default configuration of an ObjectMapper instance is to only access properties that are public fields or have public getters/setters. Jackson 라이브러리의 ObjectMapper는 Serialize 할.. 2023. 10. 10.
[Spring/Error] ids for this class must be manually assigned before calling save(): Spring, JPA 사용 시 ids for this class must be manually assigned before calling save(): 에러 발생 save() 함수 호출 전 id 값이 설정되어 있어야 함을 의미. 해결방법 DB에서 id 값을 Auto Increment 로 했을 때 entity 에서도 @GeneratedValue 어노테이션이 설정되어 있어야 한다. 참고 : https://hangjastar.tistory.com/241 2023. 2. 1.
[Spring/Error] Not a managed type: class 명 error JPA 사용 시 Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Not a managed type: 에러 발생 해결방법 해당 class에 @Entity 어노테이션 추가 참고 : https://wakestand.tistory.com/742 2023. 1. 25.
[Spring] JPA Querydsl Unsupported expression Querydsl Unsupported expression 오류 해결 방법 .as()를 통해 alias 사용하기 qHolding.goods_cnt.sum().as("sumGoodsCnt"), Expressions.stringTemplate("group_concat({0})", qHolding.user.user_id).as("userIds") GoodsHoldingDto.java public class GoodsHoldingDto { private Long goodsId; private String goodsNm; private Integer sumGoodsCnt; private String userIds; @QueryProjection public GoodsHoldingDto(Long goodsId, St.. 2022. 10. 9.
[Spring] inflearn 스프링 입문 - 스프링 DB 접근 기술 6 스프링 데이터 JPA 인터페이스만으로 개발 완료. 반복적으로 개발해온 CRUD 기능도 스프링 데이터 JPA가 제공. 코드 적을 게 없음. 그냥 쓰면 됨. 스프링부트 + JPA + 스프링 데이터 JPA 프레임워크. 관계형 데이터베이스 사용 시 스프링 데이터 JPA 필수 스프링 데이터 JPA는 JPA를 편리하게 사용하도록 도와주는 라이브러리. JPA 먼저 학습. 실제 운영시 문제들 해결할 수 없음 src/main/java/hello/hellospring/repository/SpringdataJpaMemberRepository.java SpringdataJpaMemberRepository 인터페이스 생성 인터페이스가 인터페이스를 받을 때는 extends JpaRepository T : Member ID: en.. 2022. 9. 15.