-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Conversation
…style entity loader
@Override | ||
protected void addConfigOptions(Map options) { | ||
options.put( AvailableSettings.BATCH_FETCH_STYLE, BatchFetchStyle.DYNAMIC ); | ||
options.put( AvailableSettings.DEFAULT_BATCH_FETCH_SIZE, BATCH_SIZE); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
The checkstyle warning is in org.hibernate.loader.entity.plan.package-info.java. |
|
||
@Before | ||
public void setUp() { | ||
inTransaction( |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
Fixed checkstyle and pushed upstream. Thanks! |
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! |
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 |
Supersedes #3624
FWIW checkstyle failed for me locally, but the checkstyle report showed zero errors, so....