Skip to content
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

Primary Key Ordering with Hibernate >6.4 #692

Open
novakfrobert opened this issue Apr 26, 2024 · 0 comments
Open

Primary Key Ordering with Hibernate >6.4 #692

novakfrobert opened this issue Apr 26, 2024 · 0 comments

Comments

@novakfrobert
Copy link

Hibernate 6.4 added the capability to order primary key columns by defining a Unique Index containing all the PK columns. See this hibernate issue and the relevant Hibernate PR.

I think liquibase-hibernate can make use of this by updating the PrimaryKeySnapshot.

From:
hibernatePrimaryKey.getColumns()

To:
hibernatePrimaryKey.getOrderingUniqueKey().getColumns()

That way we can order primary keys via an annotated java model and have liquibase accurately report differences, ie: if the primary key is out of order.

novakfrobert added a commit to novakfrobert/liquibase-hibernate that referenced this issue Apr 26, 2024
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

No branches or pull requests

1 participant