-
Notifications
You must be signed in to change notification settings - Fork 927
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
Support Dynamic BatchFetchStyle #2959
Conversation
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.
Please fix formatting issues identified by codefactor and by me.
Please don't review while it's WIP. It's in working state AFAIK but not polished and no dedicated tests |
c6a552e
to
cb89668
Compare
Assert.That(result.Name, Is.Not.Null); | ||
|
||
var childrenCount = result.Children.Count; | ||
//Assert.That(NHibernateUtil.IsInitialized(proxy), Is.True); |
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.
This entity is already loaded by batch loading. But proxy doesn't know about it - NHibernateUtil.IsInitialized(proxy)
returns false. Looks like an issue to me (not related to this PR)
cb89668
to
96f0654
Compare
4be6cd2
to
b8a9803
Compare
@bahusoid @hazzik property in (p0:,p1) public virtual IUniqueEntityLoader BuildLoader(IOuterJoinLoadable persister, int batchSize, LockMode lockMode, ISessionFactoryImplementor factory, IDictionary<string, IFilter> enabledFilters)
{
if (batchSize <= 1)
{
// no batching
return new EntityLoader(persister, lockMode, factory, enabledFilters);
}
return BuildBatchingLoader(persister, batchSize, lockMode, factory, enabledFilters);
} |
Fixes #1316
Port of hibernate/hibernate-orm@06b0faa (without Padded fetch style)
To start using Dynamic batch style add the following property to session-factory settings:
Or configuration by code: