Skip to content

fix: user, site#12

Merged
devcavin merged 1 commit into
mainfrom
server
Jun 30, 2026
Merged

fix: user, site#12
devcavin merged 1 commit into
mainfrom
server

Conversation

@devcavin

Copy link
Copy Markdown
Owner

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:

  • Added new repository methods in UserRepository to fetch users with their roles and sites eagerly loaded, including findByIdWithRole, findAllWithRole, findAllBySiteIdWithRole, and findByIdWithRoleAndSite. The existing findByEmailWithRole query was also updated to use DISTINCT.
  • Updated JwtAuthenticationFilter to use findByIdWithRoleAndSite for loading users, ensuring roles and sites are fetched eagerly for authentication.
  • Modified UserService.getAll to use the new repository methods, ensuring that user roles are always fetched with users, improving performance and consistency.

Dependency and Configuration Updates:

  • Downgraded springdoc-openapi-starter-webmvc-ui dependency from version 3.0.3 to 2.8.13 in build.gradle.kts.
  • Removed the unused @field:NotBlank validation from the siteId field in CreateUserRequest.
  • Cleaned up imports in ZoneDTOs.kt to remove unused imports and improve clarity.

Database and SQL Adjustments:

  • Fixed SQL syntax in V8__create_visitor_profiles.sql by adding missing semicolons after CREATE INDEX statements.

Configuration Cleanup:

  • Removed the explicit hibernate.dialect property from application.yaml, allowing Hibernate to auto-detect the dialect. Also removed the custom web error message configuration section. [1] [2]

@devcavin devcavin merged commit 5d03e0f into main Jun 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant