Skip to content

use Hibernate's short-name strategy mechanism to avoid exposing implementation details #120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NathanQingyangXu
Copy link
Contributor

@NathanQingyangXu NathanQingyangXu commented Aug 14, 2025

Hibernate has a Stragety mechanism (a little misleading for it refers to 'short-name' service, instead of Stragety Pattern) as examplified in Hibernate Integration Guide(https://docs.jboss.org/hibernate/orm/6.6/integrationguide/html_single/Hibernate_Integration_Guide.html) . As the doc explains:

Think of this as the short naming service. Historically to configure Hibernate users would often need to give fully-qualified name references to internal Hibernate classes. Of course, this has caused lots of problems as we refactor internal code and move these classes around into different package structures. Enter the concept of short-naming, using a well defined and well known short name for the strategy/implementation class.

It might be a good feature to our product with similar concern. The customization is based on the common ServiceLoader mechanism Hibernate mainly depends on (as an example stragety registration implementation in the doc).

A similar PR used to be created previously: #34. This PR is a new one based on the latest codebase.

@NathanQingyangXu NathanQingyangXu requested a review from a team as a code owner August 14, 2025 17:25
@NathanQingyangXu NathanQingyangXu requested review from katcharov and removed request for a team August 14, 2025 17:25
@NathanQingyangXu NathanQingyangXu force-pushed the use-hibernate-short-name branch from d07cf31 to d7aefc5 Compare August 14, 2025 17:28
@NathanQingyangXu NathanQingyangXu requested review from stIncMale and removed request for katcharov August 15, 2025 13:29
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