Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces several important improvements and fixes related to user retrieval, repository methods, and minor dependency and configuration updates. The main focus is enhancing how users and their roles are fetched, optimizing queries, and ensuring that related entities are eagerly loaded where necessary. Additional minor changes include dependency version adjustments, SQL syntax corrections, and DTO updates.
User and Role Retrieval Improvements:
UserRepositoryto fetch users with their roles and sites eagerly loaded, includingfindByIdWithRole,findAllWithRole,findAllBySiteIdWithRole, andfindByIdWithRoleAndSite. The existingfindByEmailWithRolequery was also updated to useDISTINCT.JwtAuthenticationFilterto usefindByIdWithRoleAndSitefor loading users, ensuring roles and sites are fetched eagerly for authentication.UserService.getAllto use the new repository methods, ensuring that user roles are always fetched with users, improving performance and consistency.Dependency and Configuration Updates:
springdoc-openapi-starter-webmvc-uidependency from version 3.0.3 to 2.8.13 inbuild.gradle.kts.@field:NotBlankvalidation from thesiteIdfield inCreateUserRequest.ZoneDTOs.ktto remove unused imports and improve clarity.Database and SQL Adjustments:
V8__create_visitor_profiles.sqlby adding missing semicolons afterCREATE INDEXstatements.Configuration Cleanup:
hibernate.dialectproperty fromapplication.yaml, allowing Hibernate to auto-detect the dialect. Also removed the custom web error message configuration section. [1] [2]