Skip to content

Conversation

@kad-barens
Copy link

@kad-barens kad-barens commented Mar 17, 2025

The FunctionContributor already has an ordinal() method to be able to influence the order in which function contributions are loaded.
The same mechanism would be helpful for Type contributions.
In our specific use case we need to override the SDOGeometryType, contributed by Hibernate Spatial, with our own custom type, for handling complex arcs.
In Hibernate 5 this worked well with a custom dialect, but with Hibernate 6 it is not possible anymore to override previously added types during service loading by changing the order in which they are loaded.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


https://hibernate.atlassian.net/browse/HHH-19247

Copy link
Member

@mbellade mbellade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I would say this change makes sense. I've left a couple comments regarding the new interface you created an some unnecessary whitespace changes that we could avoid.

@kad-barens kad-barens requested a review from mbellade March 26, 2025 08:52
Copy link
Member

@mbellade mbellade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kad-barens much better. Only one last whitespace change to revert.

Lastly, we implement improvements like this on the main branch, not on current stable versions, so please switch this PR to that and squash all change to a single commit please.

…uence the order in which serviceloaded custom types are registered
@kad-barens kad-barens changed the base branch from 6.6 to main March 27, 2025 09:32
@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Mar 27, 2025

Thanks for your pull request!

This pull request appears to follow the contribution rules.

› This message was automatically generated.

@kad-barens kad-barens changed the base branch from main to 6.6 March 27, 2025 09:46
@beikov beikov changed the base branch from 6.6 to main March 27, 2025 11:51
@beikov beikov changed the base branch from main to 6.6 March 27, 2025 11:51
@beikov
Copy link
Member

beikov commented Mar 27, 2025

Looks like changing the base doesn't work nicely on the GitHub web UI. Can you please cherry-pick this commit on top of the main branch and create a new PR?

@beikov beikov closed this Mar 27, 2025
@kad-barens
Copy link
Author

I noticed that too, I'm already working on a new PR
Thanks

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.

3 participants