Whiteship
  • Home
  • 인프런 강의
  • Java
  • Spring
  • JPA
  • SDE Tips
Subscribe

Persistence context-scoped identity

A collection of 2 posts
Detached 상태

[하이버네이트] detached 객체의 동일성

참조: JPWH 9.2.2 ~ 9.2.3 두 가지 동일성이 있다. 자바 객체 동일성과 DB 동일성이 있다. 자바 동일성은 == 으로 비교를 하고, DB 동일성은 주키 값을 비교한다. 자바 동일성과 DB 동일성이 모두 같을 조건을 Scope of object identity 라고 한다. 그 중에 세 가지 조건은 다음과 같다. – No identity
Jun 25, 2009 — 3 min read
DB identity

The Scope of Object Identity

특징 * Java identity: a==b * Database identity: x.getId().equals(y.getId()) * Scope of object identity: Java Identity와 Database identity모두 보장되는 상태. Scope of object identity 종류 * No identity scope: 하나의 DB 레코드가 같은 자바 객체로 여러번 애플리케이션으로 반환되든지 말든지 신경 안 쓴다. 문제가 생긴다. (만약에 두 개의 객체가 하나의
Feb 24, 2008 — 2 min read
Whiteship © 2022
Powered by Ghost