본문 바로가기

DB/JPA4

No identifier specified for entity 문제 해결 snowdeer.github.io/spring-boot/2019/11/28/spring-boot-no-identifier-specified-for-entity/ No identifier specified for entity 문제 해결 · snowdeer's Code Holic No identifier specified for entity 문제 해결 28 Nov 2019 | SpringBoot No identifier specified for entity 문제 해결 방법 만약 nested exception is org.hibernate.AnnotationException: No identifier specified for entity: com.snowdeer.database.board. snowdeer.g.. 2020. 11. 10.
JPA, Hibernate, 그리고 Spring Data JPA의 차이점 suhwan.dev/2019/02/24/jpa-vs-hibernate-vs-spring-data-jpa/ JPA, Hibernate, 그리고 Spring Data JPA의 차이점 개요 Spring 프레임워크는 어플리케이션을 개발할 때 필요한 수많은 강력하고 편리한 기능을 제공해준다. 하지만 많은 기술이 존재하는 만큼 Spring 프레임워크를 처음 사용하는 사람이 Spring 프레� suhwan.dev 내가 특히 오랜 기간동안 혼란스러워했던 부분은 JPA와 관련된 개념이었다. JPA 관련 서적을 읽을 때에는 분명 EntityManager를 통해 entity CRUD를 했는데, 실제 어플리케이션 코드를 보니 EntityManager는 찾아볼 수 없고 웬 Repository 인터페이스라는 놈만 쓰이고 있었다... 2020. 10. 15.
객체의 공유를 사전 차단하기 위해 @Embeddable클래스를 불변으로 만드는 것이다 coding-start.tistory.com/84 JPA - @Embedded,@Embeddable 임베디드타입 JPA - @Embedded,@Embeddable 임베디드타입 지금까지는 엔티티에 연관관계를 제외하고는 모두 자바의 기본타입에 해당하는 값만 매핑하였다. 하지만 예를 들어서 주소라는 값을 하나의 엔티티에 매핑�� coding-start.tistory.com 사실 엔티티의 값은 절대 공유되서는 안되는 값이다. 만약 1번 소비자의 주소 객체를 2번소비자의 주소객체로 레퍼런스를 전달해 공유한다면 2번 소비자의 주소객체에 수정이 일어난다면 1번 소비자의 주소객체 또한 변경이 일어날것이다.(UPDATE SQL) 그렇기 때문에 이러한 객체의 공유를 사전 차단하기 위해 @Embeddable클래스를 불변으로.. 2020. 10. 14.
JPA에서 파라미터 순서와 메서드명이 같아야 정상적으로 조회 List as = parameterRepository.findAllByPkeySysIdAndPkeyTargetIdAndPkeyModuleAndInstType(sys_id, target_id, module, type); // List as = parameterRepository.findAllByPkeySysIdAndPkeyTargetIdAndPkeyModuleAndInstType(sys_id, module, type, target_id); //위는 조회를 하지만 아래는 조회에 실패했음 2020. 10. 12.