Skip to content

Conversation

@sebersole
Copy link
Member

Just some preliminary work. Really not happy with the Removals section, but need to give that some more thought.


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.


@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Mar 17, 2025

Thanks for your pull request!

This pull request does not follow the contribution rules. Could you have a look?

❌ All commit messages should start with a JIRA issue key matching pattern HHH-\d+
    ↳ Offending commits: [0b6f76c]

› This message was automatically generated.

* Removed `MetadataContributor` -> `AdditionalMappingContributor`
* Removed `EmptyInterceptor` -> implement `org.hibernate.Interceptor` directly
* Removed `Session.LockRequest` -> use `LockOptions`
* See also,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* See also,

👀 👀 👀 👀 I'm looking buuut ...

** Removed `Session.save` in favor of `Session.persist`
** Removed `Session.saveOrUpdate` in favor `persist` if the entity is transient or `merge` if the entity is detached
** Removed `Session.update` in favor of `Session.merge`
** Removed `org.hibernate.annotations.CascadeType.SAVE_UPDATE` in favor of `org.hibernate.annotations.CascadeType.PERSIST` + `org.hibernate.annotations.CascadeType.MERGE`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
** Removed `org.hibernate.annotations.CascadeType.SAVE_UPDATE` in favor of `org.hibernate.annotations.CascadeType.PERSIST` + `org.hibernate.annotations.CascadeType.MERGE`
** Removed `org.hibernate.annotations.CascadeType.SAVE_UPDATE` in favor of `org.hibernate.annotations.CascadeType.PERSIST` and `org.hibernate.annotations.CascadeType.MERGE`

with + it looks like the formatting got broken, so maybe use words instead?

@sebersole
Copy link
Member Author

Thanks for looking!

I'm more thinking that Removals section really needs a big overhaul.

@sebersole sebersole marked this pull request as ready for review March 20, 2025 16:39
@sebersole
Copy link
Member Author

Applied this manually.

@sebersole sebersole closed this Mar 20, 2025
@sebersole sebersole deleted the migration-guide branch March 20, 2025 16:41
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