-
Notifications
You must be signed in to change notification settings - Fork 1
[NO-ISSUE] orm.xml 에 어드민리프레시토큰 추가 #216
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -119,6 +119,27 @@ | |||||
| </attributes> | ||||||
| </entity> | ||||||
|
|
||||||
| <entity class="com.souzip.domain.admin.AdminRefreshToken"> | ||||||
| <table name="admin_refresh_token"/> | ||||||
| <attributes> | ||||||
| <id name="id"> | ||||||
| <column name="id" column-definition="uuid" updatable="false" nullable="false"/> | ||||||
| </id> | ||||||
| <basic name="adminId"> | ||||||
| <column name="admin_id" column-definition="uuid" nullable="false"/> | ||||||
| </basic> | ||||||
| <basic name="token"> | ||||||
| <column name="token" nullable="false"/> | ||||||
|
||||||
| <column name="token" nullable="false"/> | |
| <column name="token" nullable="false" length="500" unique="true"/> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
adminId에 대해findByAdminId(UUID)가Optional을 반환하고 서비스 로직이 1개 레코드만 존재한다고 가정하는데, 현재 테이블/매핑에는admin_id유니크 제약이 없습니다. 동시 로그인 등으로 동일 admin_id 행이 여러 개 생기면 조회 시 NonUniqueResultException 등으로 터질 수 있으니, 의도가 '어드민당 1개의 리프레시 토큰'이라면 DB(및 orm.xml) 레벨에서admin_idUNIQUE 제약(또는 (admin_id) 유니크 인덱스)을 추가하는 쪽이 안전합니다.