Closed overheadhunter closed 5 months ago
The recent updates involve modifying the AccessToken
and LegacyAccessToken
classes to favor JPQL over native SQL queries and introducing a new field in the LegacyDevice
class. These changes aim to enhance maintainability and compatibility with Hibernate ORM, addressing concerns related to the use of native SQL for unlocking mechanisms and ensuring that the refactored access management system is robust before its release.
File Path | Change Summary |
---|---|
.../entities/AccessToken.java |
Added a JPQL named query for retrieving access tokens and updated the unlock method. |
.../entities/LegacyAccessToken.java |
Replaced @NamedNativeQuery with @NamedQuery using JPQL syntax. |
.../entities/LegacyDevice.java |
Added a new ownerId field of type String . |
Objective | Addressed | Explanation |
---|---|---|
Revert the specific commit affecting native unlock calls before shipping the refactored access management (#222) | ā | |
Avoid downgrading Quarkus or Hibernate ORM due to compatibility issues (#222) | ā | |
Ensure the changes align with Hibernate ORM's anticipated versions (#222) | ā |
In the realm of code, where bugs often hop, A rabbit worked hard, making changes non-stop. With JPQL in place, and SQL aside, šš» Celebrates the release, with joy and pride.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Fixes #222 by reverting native queries back to
@NamedQuery
.AccessToken
The unlock
@NamedQuery
avoids any join on User:Hibernate translates this to the following:
LegacyAccessToken
This is the
@NamedQuery
:Hibernate translates this to the following:
Summary by CodeRabbit
LegacyAccessToken
to enhance database compatibility.ownerId
field toLegacyDevice
for better ownership tracking.