You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
JPA (Java Persistence API)
객체 중심 프로그래밍으로 DB 작업 수행
구성 요소
주요 기능
엔티티 생명 주기
상태 전환
persist()
detach()
,clear()
,close()
remove()
merge()
비영속 vs 준영속
persist()
로 영속화merge()
로 복원JPA 동작 원리
persist
호출: 1차 캐시에 저장, 쓰기 지연 SQL 저장소에 INSERT 쿼리 생성find
1차 캐시 조회 → 캐시에 없으면 DB 조회 후 캐시에 저장commit
쓰기 지연 SQL 실행 (INSERT, UPDATE, DELETE).변경 감지
스냅샷과 엔티티 비교 → UPDATE 쿼리 생성핵심 개념
Beta Was this translation helpful? Give feedback.
All reactions