-
Notifications
You must be signed in to change notification settings - Fork 932
NH-2534 - Join-fetching a many-to-one with property-ref results in se… #1460
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
…lect n+1 problem (nhibernate#1226) fixed nhibernate#1226
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <Compile Remove="NHSpecificTest\GH01226\**" /> | ||
| <EmbeddedResource Remove="NHSpecificTest\GH01226\**" /> |
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.
Hi,
I do not think the changes on the test csproj are needed. Please revert them or explain them.
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.
Yes, it is wrong lines. I will fix them
…lect n+1 problem (nhibernate#1226) fix NHibernate.Test.csproj
| </ItemGroup> | ||
| <ItemGroup> | ||
| <Folder Include="NHSpecificTest\GH1226\" /> | ||
| </ItemGroup> |
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.
Thanks, but, this change too should not be needed. We have migrated to the new csproj format also for ceasing having changes in it just for adding a test. Is there a specific reason this test would require this change while the other tests do not?
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.
I missed this changes in the VS file format, thanks
…lect n+1 problem (nhibernate#1226) fix NHibernate.Test.csproj
* Fix ProxyFactory cache - use a correct implementation of cache - reduce the number of allocations of ProxyCacheEntry - reduce memory flow
* Always pass format arguments to the logger. * Enable better structured logging. * Update NHibernate.Example.Web to use new INHibernateLoggerFactory.
- Make methods of UpdateTimestampsCache virtual - Mark some methods UpdateTimestampsCache obsolete
|
I have re-formatted the test case for them to comply with contributing guideline. Their async counterparts are lacking, but I cannot regenerate the async files because your PR use an out-of-date base, 59 commits behind NHibernate master. Please rebase your master for having it even with current NHibernate master, then rebase your PR (and squash its
|
src/NHibernate/Loader/Loader.cs
Outdated
| ILoadable entityPersister = (ILoadable) persister; | ||
| string[][] cols = EntityAliases[i].SuffixedPropertyAliases; | ||
|
|
||
| object[] values = entityPersister.Hydrate(rs, id, obj, entityPersister, cols, eagerPropertyFetch, session); |
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.
Here, there is a trouble. The referenced property may be mutable. If it has changed in DB but is still loaded in session with the old value, we are then going to associate a unique key on the new value with an entity still holding the old value. Instead of reading its value from the result set, it should be read from the entity in session (obj).
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.
We need to test this case.
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.
Done in #1492.
|
My last commit change the fix for a more proper implementation in my opinion. |
|
@fredericDelaporte Thanks, I will make changes corresponding your recommendations. Also I did not make changes to corresponding async method InstanceAlreadyLoadedAsync. |
Just in case, I remind you this is the job of the async generator, do not make them manually. Run the async generator instead. But this requires first to update this branch. |
|
My last commit causes a regression in a test, so it needs more work too. |
|
I have added the fix, everything is to be squashed in a single one (or will be squashed when merging). |
- The factory generates high-efficient static proxies (no interceptor)
- Add tests for legacy logger - Don't split global state for logging. Fixes nhibernate#1478
* Remove logic duplication for getting default NHibernate type for a CLR type. * Test all defaults for CLR type having many possibilities. * Clean-up.
* And fix ComponentType.IsModified(…) method throws exception when used with a component as "old" parameter. * Fix nhibernate#1486
Done in #1492. If you take time doing it yourself on your PR, we will merge it. Otherwise my PR will likely be merged and this one closed as replaced. |
|
Hi, Commits from master should not appear here. I guess something went wrong in the way this branch was brought up-to-date with master. It should look like in #1492, where only the changes of this PR appear, while still having the latest commit from master. May you try re-basing again? Assuming your local branches are named the same than your remotes one, this should be doable with: Here you may have a bunch of conflict to solve. Solve each conflict, re-add each file which were in conflict (stage it), then continue with: This may lead to another conflicts to resolve, in such case resolve those other ones the same way. And ultimately the rebase will end. |
|
Duplicate of #1492 |
…lect n+1 problem (#1226)
fixed #1226