Skip to content

[4.3] test support for partition key annotation#3262

Open
roguebee-droid wants to merge 2 commits intohibernate:mainfrom
roguebee-droid:3108-Test-support-for-PartitionKey-annotation
Open

[4.3] test support for partition key annotation#3262
roguebee-droid wants to merge 2 commits intohibernate:mainfrom
roguebee-droid:3108-Test-support-for-PartitionKey-annotation

Conversation

@roguebee-droid
Copy link
Copy Markdown

I've added a fairly straightforward test for partition key #3108 based on what is in hibernate-orm

Hibernate-orm does have some more tests for this annotation for specific databases as well as association which I haven't done here but could add if required.

@DavideD
Copy link
Copy Markdown
Member

DavideD commented Feb 27, 2026

Why this PR contains changes to TimeStampTest?

@roguebee-droid
Copy link
Copy Markdown
Author

My previous issue fix is on my main branch which I branched off, want to leave that as it is till it's merged into yours rather than potentially mess up that issue. I'm going to rebase to an earlier commit and do the changes to that, then force them onto this branch. You might need to reopen this pull request again as that could auto close the pull request. Sorry about this, learning experience with github.

@roguebee-droid roguebee-droid force-pushed the 3108-Test-support-for-PartitionKey-annotation branch from dedd684 to fb87b38 Compare March 2, 2026 12:56
@DavideD
Copy link
Copy Markdown
Member

DavideD commented Mar 10, 2026

Thanks a lot.

I don't think this test is enough, though. The problem is that I can remove the annotation and it doesn't fail.
I think you can solve it by checking the native queries generated by the test. They should contain a where clause related to the annotated column.
You can probably mimic the test in Hibernate ORM: PartitionKeyTests

Although, in Hibernate Reactive we have a different way to check SQL queries, you can find an example here:
You can see an example in FetchedAssociationTest.

Because the queries will use standard SQL, I think it should work on all databases even if you are testing native queries.

The Hibernate ORM documentation has an example of the SQL looks like: Section 3.11.1 Partitioning

@DavideD DavideD changed the title 3108 test support for partition key annotation [4.3] test support for partition key annotation Mar 10, 2026
Copy link
Copy Markdown
Member

@DavideD DavideD left a comment

Choose a reason for hiding this comment

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

See my previous comment: #3262 (comment)

@DavideD DavideD added the 4.3 ORM 7.3 and Vert.x 5.0 label Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.3 ORM 7.3 and Vert.x 5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants