Skip to content

Add Hibernate 7 module #185

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

Merged
merged 18 commits into from
Jul 9, 2025
Merged

Add Hibernate 7 module #185

merged 18 commits into from
Jul 9, 2025

Conversation

pjfanning
Copy link
Member

@pjfanning pjfanning commented Jun 27, 2025

Implements #184 adding jackson-datatype-hibernate7 module.

@pjfanning pjfanning changed the title hibenate 7 hibernate 7 Jun 27, 2025
@pjfanning pjfanning requested a review from cowtowncoder July 9, 2025 20:38
@@ -249,6 +249,7 @@ private String getIdentifierPropertyName(final LazyInitializer init) {
if (_mapping != null) {
idName = _mapping.getIdentifierPropertyName(init.getEntityName());
} else {
// no unit tests rely on this next call and Hibernate 7 does not support it
Copy link
Member

Choose a reason for hiding this comment

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

Is this change related to Hibernate 7 addition? If not (and I suspect it isn't), could we have separate PR to merge this change in first?

Copy link
Member Author

Choose a reason for hiding this comment

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

separated this to #186

Copy link
Member

Choose a reason for hiding this comment

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

Merged, updated this PR.

@cowtowncoder
Copy link
Member

@pjfanning Looks good overall (although TBH can't really review much of Hibernate 7 module itself). I merged small parts of pom.xml changes (compiler plug-in specifying JDK 8 for versions 4 and 5).

But one thing, as per my comment: looks like there are unrelated Hibernate 6 changes (fixes I presume): if so, would it make sense to merge them in via separate PR, before main change of adding Hibernate 7 module?

@cowtowncoder cowtowncoder changed the title hibernate 7 Add Hibernate 7 module Jul 9, 2025
Copy link
Member

@cowtowncoder cowtowncoder left a comment

Choose a reason for hiding this comment

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

LGTM: ideally would separate H6 changes to separate PR but that's just tactical change.

{
protected BaseTest() {
try {
System.out.println(Hibernate7Version.isHibernate7_Plus());
Copy link
Member

Choose a reason for hiding this comment

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

Oh, missed this one: should probably be removed, or (if useful) add bit more context.

Copy link
Member Author

Choose a reason for hiding this comment

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

  • removed the println but kept the log stmt
  • this code is mainly a copy/paste of the hibernate6 module with some changes to account for API changes
  • the BaseTest is basically unmodified

Copy link
Member

Choose a reason for hiding this comment

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

Ah. Did not realize -- will remove println's from other modules' BaseTests too.

cowtowncoder added a commit that referenced this pull request Jul 9, 2025
@cowtowncoder cowtowncoder merged commit cb6c7db into 2.x Jul 9, 2025
3 checks passed
@cowtowncoder cowtowncoder deleted the hibernate7 branch July 9, 2025 22:49
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.

2 participants