Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- Greedy
- JDBC
- db
- pointcut
- AOP
- java
- 스프링
- springdatajpa
- transaction
- 스프링 핵심 기능
- SpringBoot
- 그리디
- 인프런
- QueryDSL
- 김영한
- 백준
- Spring Boot
- 자바
- 스프링 핵심 원리
- JPQL
- jpa
- spring
- Exception
- http
- Proxy
- kotlin
- Android
- Thymeleaf
- 알고리즘
- Servlet
Archives
- Today
- Total
목록일대다 연관관계 (1)
개발자되기 프로젝트
1 : N 연관관계 - 1
이전에 만들어둔 User entity와 User History는 1:N연관관계를 갖는다. User는 현재 회원정보를 가지고 있는 테이블이고 UserHistory는 특정 user id에 저장된 값이 변경된 내역을 저장하는 table이다. 1. test @Test void userRelationTest(){ User user = new User(); user.setName("David"); user.setEmail("dabid@navergoogle.com"); user.setGender(Gender.MALE); userRepository.save(user); userHistoryRepository.findAll().forEach(System.out::println); } } 먼저 relation을 테스트 하..
JPA
2021. 6. 21. 19:55