fix/#150: 네컷사진 삭제 시 Soft Delete 로 변경#151
Conversation
Summary of ChangesHello @Darren4641, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 Pull Request는 데이터 보존 및 추적의 필요성에 따라 애플리케이션의 삭제 로직을 Hard Delete에서 Soft Delete 방식으로 전환합니다. PhotoImage와 Media 엔티티 모두에 대해 삭제 시 실제 데이터를 제거하는 대신, 특정 필드(예: deleted_at, status)를 업데이트하여 논리적으로 삭제된 상태를 표시하도록 변경되었습니다. 이는 데이터 복구 가능성을 높이고, 삭제 이력을 관리하며, S3 스토리지의 미디어 파일이 실수로 삭제되는 것을 방지하는 데 기여합니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Code Format Check ✅
|
Test ✅
|
There was a problem hiding this comment.
Code Review
데이터 보존 및 추적을 위해 Hard Delete에서 Soft Delete로 전환하는 작업을 전반적으로 잘 수행하셨습니다. 특히 Hibernate의 @SQLRestriction을 활용하여 조회 시 삭제된 데이터를 자동으로 필터링하고, DB 레벨에서 Partial Unique Index를 통해 Soft Delete된 레코드와의 충돌을 방지한 점이 인상적입니다. 다만, QueryDSL의 update 쿼리에서 수동으로 필터를 추가한 것과 달리 일부 select 쿼리나 로거 사용 부분에서 개선의 여지가 보입니다.
| .update(photoImage) | ||
| .setNull(photoImage.folderId) | ||
| .where(photoImage.userId.eq(userId), photoImage.folderId.`in`(folderIds)) | ||
| .where(photoImage.userId.eq(userId), photoImage.folderId.`in`(folderIds), photoImage.deletedAt.isNull) |
Description
Action Item
@SQLRestriction("deleted_at IS NULL")을 추가하여 조회 시 기본으로 where deleted_at is null 조건 추가