Skip to content

Conversation

saleese
Copy link

@saleese saleese commented Dec 31, 2024

[Please describe here what your change is about]
Regarding the outdated API references, I made the following changes in three adoc files:

    1. getDefaultBatchLoadSizingStrategy was deleted but the change has not been reflected in the current version of the user guide at https://github.com/hibernate/hibernate-orm/blob/main/documentation/src/main/asciidoc/userguide/chapters/pc/PersistenceContext.adoc

Before: The default is to use a batch sizing strategy defined by the Dialect.getDefaultBatchLoadSizingStrategy() method.
After: The default is to use a batch sizing strategy defined by the configuration settings in Hibernate.

  1. LazyToOneOption was deleted but the change has not been reflected in the current version of the user guide at https://github.com/hibernate/hibernate-orm/blob/main/documentation/src/main/asciidoc/userguide/chapters/pc/BytecodeEnhancement.adoc

Before: As a hopefully temporary legacy hold-over, it is currently required that all lazy singular associations (many-to-one and one-to-one) also include @LazyToOne(LazyToOneOption.NO_PROXY).
After: For existing codebases, it is recommended to remove usages of @LazyToOne, such as @LazyToOne(LazyToOneOption.NO_PROXY), and instead rely on default lazy loading behavior or explicitly configure fetch strategies using @OnetoOne or @manytoone annotations with fetch = FetchType.LAZY where necessary, such as @OneToOne(fetch = FetchType.LAZY).

    1. GenerationTime was deleted but the change has not been reflected in the current version of the user guide at https://github.com/hibernate/hibernate-orm/blob/main/documentation/src/main/asciidoc/userguide/chapters/locking/Locking.adoc

Before: If the version number is generated by the database, such as a trigger, use the annotation @org.hibernate.annotations.Generated(GenerationTime.ALWAYS) on the version attribute.
After: If the version number is generated by the database, such as a trigger, implement a custom generator by extending the OnExecutionGenerator interface, and apply it to the version attribute using a custom annotation. Refer to the Hibernate documentation for the latest guidelines on handling database-managed attributes.


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-18993

@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Oct 6, 2025

Thanks for your pull request!

This pull request appears to follow the contribution rules.

› This message was automatically generated.

@yrodiere yrodiere force-pushed the feature-branch-documentation-saleese branch from e68ccde to 0ff588c Compare October 6, 2025 09:11
Copy link
Member

@yrodiere yrodiere left a comment

Choose a reason for hiding this comment

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

I rebased and applied suggested changes.

I think we're good to merge @saleese @gavinking ?

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.

4 participants