-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
๐ :: (ENTRY-25) User Change Password API ๊ฐ๋ฐ #7
The head ref may contain hidden characters: "feature/entry-25-\uC720\uC800-\uBE44\uBC00\uBC88\uD638-\uC7AC\uC124\uC815-api-\uAC1C\uBC1C"
๐ :: (ENTRY-25) User Change Password API ๊ฐ๋ฐ #7
Conversation
ENTRY-25 ์ ์ ๋น๋ฐ๋ฒํธ ์ฌ์ค์ API ๊ฐ๋ฐ
|
val user = User( | ||
id = null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ทผ๋ฐ ๊ฐ์๊ธฐ ๊ถ๊ธํ ๊ฒ ์ ์ฌ๊ธฐ null์ธ๊ฐ์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ ์ค์์ธ ๊ฒ ๊ฐ๋ค์..
UUID(0, 0) ์ผ๋ก ์ด๊ธฐํ ํด์ฃผ๊ฒ ์ต๋๋น..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํน์ 0,0 ์ผ๋ก ์ด๊ธฐํํ๋ฉด db์ ์ด๋ป๊ฒ ์ ์ฅ๋๋์ง ์์๋์
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BaseUUIDEntity์ UUID(0, 0) ์ด๋ฉด null๋ก ๋ฐ๊ฟ์ค์ jpa๊ฐ ์๋์ผ๋ก UUID ์์ฑํด ์ฃผ๋๊ฑธ๋ก ์๊ณ ์์ต๋๋ค
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ทธ๋ ๋ค๋ฉด ์ง์ Random.UUID()๋ฅผ ์ฐ์ง ์๊ณ (0,0)์ ์ฌ์ฉํ๋ ์ด์ ๋ ๋ฌด์์ธ๊ฐ์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GeneratedValue ์ด๋ ธํ ์ด์ ์ ๋ฌ์์ ์๋์ผ๋ก ID๋ฅผ ์์ฑํ๋๋ก ํ๊ธฐ ๋๋ฌธ์ user์์ UUID(0,0) ์ผ๋ก ์ง์ ํด ์ฃผ๊ณ BaseUUIDEntity์์ UUID(0, 0) ์ด๋ฉด null๋ก ๋ฐ๊ฟ์ฃผ์ด JPA๊ฐ ์์ฑํด์ฃผ๋ id๋ฅผ ์ฌ์ฉํ๋๋ก ํ์์ต๋๋ค
takeIf๋ผ๋ ๋ฉ์๋๊ฐ ์์๋ค์~ ๋๋ถ์ ์ ๋ ๋ฐฐ์๊ฐ๋๋ค๐ |
close #ENTRY-25