Move to JPA from hbm.xml#136
Merged
ottenhoff merged 8 commits intosakaicontrib:masterfrom Oct 22, 2025
Merged
Conversation
iihsann
pushed a commit
to iihsann/attendance
that referenced
this pull request
Dec 25, 2025
…kaicontrib#136) - Replaced the legacy Hibernate XML mappings with annotation-based JPA entities and moved date fields to Instant across the attendance domain model, adding the necessary relationship metadata and last-modified tracking. - Refactored AttendanceDao and its implementation to drop GenericDAO, rely on the shared SessionFactory, and use the JPA Criteria API plus merge/Instant-aware queries and updates instead of named queries. - Updated Spring wiring to enable @transactional on the service layer, inject the DAO directly, and introduce an AttendanceStatCalcService interface plus TransactionTemplate so the stats job can manage batch updates in explicit transactions. - Adjusted stat-calculation and logic classes to operate on the new entity shape (including Instant sync times), and reworked the cron job to mark batches and calculate per site within dedicated transactions. - Upgraded the Wicket stack to 9.21.0 and changed the tool UI to convert between Instant and Date, fix the breadcrumbs markup error, and ensure interactive links (e.g., in StudentView) bind safely without JavaScript fallbacks. - Added lightweight unit tests covering model defaults/validation and the new stats helper to give coverage for the refactored code paths.
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.
Key Changes