Skip to content

Conversation

@canermastan
Copy link
Owner

No description provided.

- Replace deprecated session.createQuery() with session.createMutationQuery() for DELETE operations
- Fixes compatibility with future Hibernate versions
- Removes FIXME comments and deprecation warnings
- Affects deleteAllById() and deleteAll() methods in BaseRepositoryImpl

Resolves: Deprecated API usage warnings
Breaking: Uses modern Hibernate 6 APIs
- Add executeInTransaction() method for operations returning values
- Add executeInTransactionVoid() method for void operations
- Both methods include proper rollback handling on exceptions
- Improves transaction safety and error handling
- Adds required Function and Consumer imports

These helpers can be used by subclasses for safer transaction management.
- Add comprehensive CHANGELOG.md following Keep a Changelog format
- Update README.md with v0.3.1 version information
- Document all changes, fixes, and improvements in this release
- Update version history table with bug fixes and improvements

Provides clear documentation of what changed in v0.3.1.
…tion

- Add executeInTransaction() and executeInTransactionVoid() helper methods with automatic rollback
- Refactor save(), findById(), and deleteById() to use safe transaction helpers
- Fix critical bug: transactions now properly rollback on exceptions
- Add transaction.isActive() checks before rollback attempts
- Reduce code duplication from 8+ lines to 1 line per transaction
- Improve code readability and maintainability

BREAKING: Fixes transaction leak bug that could cause database connection issues
This is a critical production safety fix.
@canermastan canermastan changed the title Fix/hibernate deprecated apis v0.3.1 fix: hibernate deprecated apis v0.3.1 May 25, 2025
@canermastan canermastan merged commit cb72abf into main May 30, 2025
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.

2 participants