-
Notifications
You must be signed in to change notification settings - Fork 1
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
[HANSEL-119] Set Version Column & Refactor RegisterReviewStats #122
base: release/v0.2.0
Are you sure you want to change the base?
Changes from 2 commits
a0b2420
8192e66
af065fb
0149127
0040211
01cf49b
c3a17ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
public class Review { | ||
|
||
private final ID id; // ๋ฆฌ๋ทฐ ID | ||
@Getter private Integer version; // Optimistic Lock | ||
@Getter private final BiddingThread.ID threadId; // ์ ์ฐฐ ์ค๋ ๋ ID | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. version ์ ๋ฐ์ดํฐ๋ฒ ์ด์ค ๋จ์์๋ง ์ฌ์ฉ๋๋ ๊ฒ์ผ๋ก ์๊ณ ์์ต๋๋ค There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ๋ ๋๋ฉ์ธ๊ณผ ์ํฐํฐ๋ฅผ ํ๋์ ๊ด๊ณ๋ผ๊ณ ์๊ฐํ ๊ฒ ๊ฐ์ต๋๋ค. |
||
@Getter private ReviewRating reviewRating; // ๋ณ์ | ||
@Getter private String contentDetail; // ์์ธ๋ฆฌ๋ทฐ | ||
|
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.
domain ๋ชจ๋์ ๋ชจ๋ ๋ชจ๋์ด ์ฐธ์กฐํ๊ณ ์๋ ๋ชจ๋์ด๊ธฐ ๋๋ฌธ์ implemantation ์ ํ ๋ ๋์ฑ ๋ช ํํ ์ด์ ๊ฐ ์์ด์ผ ํ ๊ฒ์ ๋๋ค
์ด ์ข ์์ด ์๋ ์ด์ ๊ฐ ๋ฌด์์ธ๊ฐ์?
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.
OptimisticLockException์ ์ฌ์ฉํด๋ณด๊ณ ์ ํ์ต๋๋ค.
Domain์ ์ฃผ์ ํ ๊น๋ญ์, Domain test์์ ReviewCountingTest๋ฅผ ์งํํ ๊ฒ์ด๊ธฐ ๋๋ฌธ์ ํด๋น 'jakarta.persistence:jakarta.persistence-api:3.1.0'์ implementationํด์ผ ํ์ง ์์๊น ํ๋ ์๊ฐ์ ์ข ์์ ํ์ต๋๋ค
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.
์ฐ๋ฆฌ๊ฐ ์ฒ์ ์ ํ๋ฏ์ด domain ๋ชจ๋์ ์ธ๋ถ ๊ธฐ์ ์ ์ข ์์ ์ต์ํํ๊ณ ์ค์ํ ๋น์ฆ๋์ค ๋ก์ง์ ๋ด์ ์์ ์๋ฐ ๊ฐ๋ ๊ฐ์ฒด๋ฅผ ๊ด๋ฆฌํ๋ ์ฑ ์์ ๊ฐ์ง๊ณ ์์ด์
๋ค๋ง ๋ง์ํ์ ReviewCountingTest ๋ ๋ฐ์ดํฐ๋ฒ ์ด์ค ๊ธฐ์ ์ด ํ์ํ ๊ฒ์ด๋ผ... persistence ๋ชจ๋์ ์ฑ ์์ด ์๋๊น ์ถ์ต๋๋ค
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.
๊ทธ๋ ๋ค๋ฉด ๊ถ๊ธํ ๊ฒ์ด ์๋๋ฐ์.
๊ธฐ์กด ReviewCountingTest๋ผ๋ ํด๋์ค๋ฅผ ๋ง๋ค์ด์ ๋ฆฌ๋ทฐ ๋ก์ง ๊ทธ๋ฌ๋๊น CRUD๊ฐ ์ ์ ์๋ํ๋์ง๋ฅผ ํ ์คํธ ํ์๋๋ฐ์.
๊ทธ๋ ๋ค๋ฉด ๋์์ฑ ์ด์๋ ํด๋น ๋๋ฉ์ธ์์์ ๋น์ฆ๋์ค ๋ก์ง์ด ์๋ DB์ ์ฐ๊ด๋ ์ด์๋ผ๊ณ ๋ด์ผํ๋ ๊ฒ์ด๊ธฐ ๋๋ฌธ์ Persistence์์ ํ ์คํธ๋ฅผ ์งํํด์ผ ํ๋ ๊ฒ์ผ๊น์?
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.
๋ง์์ ๋ฆฌ๋ทฐ์ ๋์์ฑ ๋ฌธ์ ํด๊ฒฐ์ ๋น์ฆ๋์ค๋ผ๊ณ ๋ณด๊ธฐ ์ด๋ ต์ฃ !
๋์์ฑ ๋ฌธ์ ๋ ๋ฐ์ดํฐ๋ฒ ์ด์ค ์์์์ ๋ฌธ์ ๋ผ๊ณ ์๊ฐํฉ๋๋ค