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 |
Tags
- 디자인패턴
- 장애물인식
- 논문리뷰
- 영속성컨텍스트
- 포인트클라우드
- MySQL
- persistance context
- 알고리즘
- 아두이노
- JPA
- 논문
- Hibernate
- 이펙티브자바
- Jetson
- Database
- 네트워크
- 자료구조
- cartograhper
- 자율주행
- Spring Batch
- 운영체제
- 파이썬
- DeepLearning
- 배달로봇
- 프로그래머스
- Python
- Java
- 딥러닝
- 자바ORM표준JPA프로그래밍
- 자바
Archives
- Today
- Total
목록findById (1)
제리 devlog

JPA를 사용하면서 연관 관계를 갖는 엔티티를 만들어 주기위해 연관된 엔티티를 조회해오는 경우가 있다. 아래 게시글에 댓글을 의미하는 Comment엔티티가 있다. @Getter @NoArgsConstructor @Entity public class Comment { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @ManyToOne(fetch = FetchType.LAZY) private Post post; @Lob private String content; @Builder public Comment(Post post, String content) { this.post = post; this.content = content..
JPA
2021. 5. 30. 20:56