feat(admin-character): 캐릭터 수정 API
- 태그 중복 매핑이 되지 않도록 수정
This commit is contained in:
		| @@ -72,7 +72,7 @@ class ChatCharacter( | ||||
|     @OneToMany(mappedBy = "chatCharacter", cascade = [CascadeType.ALL], fetch = FetchType.LAZY) | ||||
|     var relationships: MutableList<ChatCharacterRelationship> = mutableListOf() | ||||
|  | ||||
|     @OneToMany(mappedBy = "chatCharacter", cascade = [CascadeType.ALL], fetch = FetchType.LAZY) | ||||
|     @OneToMany(mappedBy = "chatCharacter", cascade = [CascadeType.ALL], fetch = FetchType.LAZY, orphanRemoval = true) | ||||
|     var tagMappings: MutableList<ChatCharacterTagMapping> = mutableListOf() | ||||
|  | ||||
|     @OneToMany(mappedBy = "chatCharacter", cascade = [CascadeType.ALL], fetch = FetchType.LAZY) | ||||
|   | ||||
| @@ -120,7 +120,7 @@ class ChatCharacterService( | ||||
|      */ | ||||
|     @Transactional | ||||
|     fun addTagsToCharacter(chatCharacter: ChatCharacter, tags: List<String>) { | ||||
|         tags.forEach { addTagToCharacter(chatCharacter, it) } | ||||
|         tags.distinct().forEach { addTagToCharacter(chatCharacter, it) } | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user