Add Comment DTOs and update Comment handling#40
Add Comment DTOs and update Comment handling#40annikaholmqvist94 wants to merge 2 commits intomainfrom
Conversation
- Introduced `CreateCommentRequest` and `UpdateCommentRequest` DTOs with validation. - Added `CommentResponse` DTO for transformed comment views. - Updated `CommentRepository` with `@EntityGraph` for optimized fetching. - Removed cascade behavior from `medicalRecord` and `author` relationships in `Comment` entity. - Added `jakarta.validation-api` dependency to enable validation annotations. Closes #25
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdded Spring Boot validation starter dependency; introduced comment request/response DTO records with Jakarta Bean Validation annotations; removed cascade delete on Comment entity relationships; and added EntityGraph annotations to Comment repository query methods. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pom.xml`:
- Around line 76-81: Remove the explicit
jakarta.validation:jakarta.validation-api dependency and replace it with
org.springframework.boot:spring-boot-starter-validation so the project gets the
Jakarta Validation API, Hibernate Validator runtime, and Spring Boot validation
auto-configuration; update the pom by deleting the dependency block for
jakarta.validation-api and adding a dependency for
spring-boot-starter-validation
(org.springframework.boot:spring-boot-starter-validation) aligned with your
Spring Boot 4.0.4 BOM.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d71b4ad6-1e71-42ed-b191-e3ea35cdb41d
📒 Files selected for processing (6)
pom.xmlsrc/main/java/org/example/vet1177/dto/request/comment/CreateCommentRequest.javasrc/main/java/org/example/vet1177/dto/request/comment/UpdateCommentRequest.javasrc/main/java/org/example/vet1177/dto/response/comment/CommentResponse.javasrc/main/java/org/example/vet1177/entities/Comment.javasrc/main/java/org/example/vet1177/repository/CommentRepository.java
…` in `pom.xml` Closes #25
CreateCommentRequestandUpdateCommentRequestDTOs with validation.CommentResponseDTO for transformed comment views.CommentRepositorywith@EntityGraphfor optimized fetching.medicalRecordandauthorrelationships inCommententity.jakarta.validation-apidependency to enable validation annotations.Closes #25
Summary by CodeRabbit
New Features
Bug Fixes
Refactor