-
Notifications
You must be signed in to change notification settings - Fork 935
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
Refactor sequential select #1979
Refactor sequential select #1979
Conversation
ba0f915
to
4f8c972
Compare
This sequential select feature such a mess..... |
And also a quite old one that hasn't changed since 2007 even in Hibernate. I've restored the |
What that feature is about? Eager fetch mode |
It's about eager joins ( About mapping like this: nhibernate-core/src/NHibernate.Test/Join/Person.hbm.xml Lines 7 to 72 in 1711b5c
|
There are some conflicts to resolve with #1922 merge into master. For |
Conflicts are resolved. |
propertyTableNumbersByNameAndSubclass[prop.PersistentClass.EntityName + '.' + prop.Name] = | ||
persistentClass.GetJoinNumber(prop); |
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 logic is wrongly placed here. This calculation makes sense only for SingleTableEntityPersister
. It's wrong for all others persisters (fills dictionary with 0 for all properties).
Ok. It makes sense for sequenitial select. But it contains info only about join elements inside subclasses and 0 for all other places. So GetSubclassPropertyTableNumber(string propertyName, string entityName)
behaves quite differently to GetSubclassPropertyTableNumber(string propertyPath)
. Which is confusing.
This PR moves the generated sequential statements form the root entity to its subclasses which then simplifies the
ILoadable.Hydrate
method as the root persister parameter is not needed anymore.