๋ชฉ๋กGenerationType.IDENTITY (1)
DevLog ๐ถ

๐ฑ JPA ๊ธฐ๋ณธ ํค ์์ฑ ์ ๋ต JPA์์ ์ ๊ณตํ๋ ๊ธฐ๋ณธ ํค ์์ฑ ์ ๋ต์ ํฌ๊ฒ 5๊ฐ์ง๋ก ๋๋์ด์ง๋ค. - TABLE, SEQUENCE, IDENTITY, UUID, AUTO ๊ฐ ์ ๋ต์ ๋ํด์ ํ๋์ฉ ์์๋ณด๋๋ก ํ์. ๐ฑ TABLE ๐ก Indicates that the persistence provider must assign primary keys for the entity using an underlying database table to ensure uniqueness. - ๋ฐ์ดํฐ๋ฒ ์ด์ค ํ ์ด๋ธ์ ์ฌ์ฉํ์ฌ ์ํฐํฐ์ ๊ธฐ๋ณธ ํค๋ฅผ ํ ๋นํด์ผ ํ๋ค. ๐ฌ ์ํฐํฐ ์ค์ @Entity class User( @Id @GeneratedValue(strategy = GenerationType.TABLE) val id: Lon..
Back-end/JPA
2023. 7. 7. 17:16