※ 부서는 상위 부서정보를 갖고 N명의 멤버 정보를 갖는다 @Data@Entity@Table(name = "dept")public class Department implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue @Column(name = "dept_id") private int deptId; @Column(name = "pdept_id") private int pdeptId; @Column(name = "mem_id") private int memId; @OneToMany(fetch=FetchType.EAGER, cascade = CascadeType.ALL) @Fetch(FetchMo..
※부서는 하위 부서정보를 갖는다. @Data@Entity@Table(name = "dept")public class Department implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue @Column(name = "dept_id") private int deptId; @Column(name = "pdept_id") private int pdeptId; @Column(name = "mem_id") private int memId; @OneToMany(fetch=FetchType.EAGER, cascade = CascadeType.ALL) @JoinColumn(name = "pdept_id..
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.sample.vo.Team.members, could not initialize proxy - no Session 일대다 맵핑 테스트 코드를 실행하는데 Team조회하고 해당 TeamId에 맵핑된 Member를 조회하지 못하는 오류가 발생한다. 해결방법은 두가지가 있는데, 첫번째는 Team.java OneToMany에 fetch = FetchType.EAGER 추가 두번째는 테스트 코드에 @Transactional을 추가. 로그를 보니 첫번째 방법은 두개 테이블을 Join하여 조회. 두번째 방법은 Team, Member 두번에 나눠서 ..
- Total
- Today
- Yesterday
- db connect
- timestamp
- Python
- StAX
- JPA 오류
- Elasticsearch
- 단축키
- iTerm
- JoinColumn
- 서버 환경변수
- JPA
- 계층형
- org.hibernate.LazyInitializationException
- aws cloudsearch
- could not initialize proxy - no Session
- #csvreader
- OneToMany
- CloudSearch
- getdate
- oracle12
- Big xml 파싱
- ojdbc7
- 엘라스틱서치
- tomcat
- cloudsearch 비용
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |