Spring/@annotation

@OneToMany

melitina 2024. 1. 16. 03:58

https://kdohyeon.tistory.com/63

 

[JPA] @ManyToOne, @OneToMany 를 활용하기

이 어노테이션들은 언제 사용하는거지? 스프링에서 1:N 관계의 테이블을 엮어야 할 때 사용하게 된다. 예시 Order (주문) 엔티티와 OrderItem (주문 아이템) 엔티티는 @OneToMany, @ManyToOne 어노테이션을

kdohyeon.tistory.com

 

'Spring > @annotation' 카테고리의 다른 글

@Resource  (1) 2024.01.21
@OneToOne  (0) 2024.01.16
@PathVariable  (1) 2024.01.11
@Transactional  (0) 2024.01.10
@RestController = @Controller + @ResponseBody  (0) 2024.01.10