Skip to content

HHH-14312 : entity-graph and batch loading #3631

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

Closed
wants to merge 2 commits into from

Conversation

sebersole
Copy link
Member

Supersedes #3624

FWIW checkstyle failed for me locally, but the checkstyle report showed zero errors, so....

@Override
protected void addConfigOptions(Map options) {
options.put( AvailableSettings.BATCH_FETCH_STYLE, BatchFetchStyle.DYNAMIC );
options.put( AvailableSettings.DEFAULT_BATCH_FETCH_SIZE, BATCH_SIZE);
Copy link
Member

Choose a reason for hiding this comment

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

Probably the missing space before the right parenthesis is the checkstyle issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

Local checkstyle report points to the common package-info.java issue that new line is missing at the end of the file.

@NathanQingyangXu
Copy link
Contributor

Supersedes #3624

FWIW checkstyle failed for me locally, but the checkstyle report showed zero errors, so....

The checkstyle warning is in org.hibernate.loader.entity.plan.package-info.java.
Screen Shot 2020-11-10 at 10 05 01 AM


@Before
public void setUp() {
inTransaction(
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be great to combine two testing case into one by parameterizing the BatchFetchStyle enum values. In JUnit5, there is parameterized testing feature: https://www.baeldung.com/parameterized-tests-junit-5. In JUnit4 it is possible as well and we have some existing examples in v5 already.
No need to change it for this PR though. Simply raise the awareness of some nice features introduced since JUnit5.

* Support for entity loaders built on top of the {@link org.hibernate.loader.plan}
* API to apply entity-graphs
*/
package org.hibernate.loader.entity.plan;
Copy link
Contributor

Choose a reason for hiding this comment

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

The above warning is the issue checkStyle complains.

@sebersole
Copy link
Member Author

Fixed checkstyle and pushed upstream. Thanks!

@sebersole sebersole deleted the HHH-14312 branch November 10, 2020 22:18
@gavinking
Copy link
Member

This surely must need replication in HR, but I'm having trouble seeing precisely what has changed. Can someone give me a quick explanation, thanks!

@sebersole
Copy link
Member Author

We ended up using the set of Loaders based on walking the model to apply graphs. The old (original) Loaders did not lend themselves to applying graphs.

So the changes here were mainly - finishing the walking-based batch Loaders and using them instead of the legacy ones

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