-
Notifications
You must be signed in to change notification settings - Fork 934
NH-3848 - Tests and fix for HQL #463
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
NH-3848 - Tests and fix for HQL #463
Conversation
Rebased to resolve conflicts |
This comment has been minimized.
This comment has been minimized.
} | ||
} | ||
|
||
public bool CanAddFetchedCollectionToCache |
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 probably needs to be moved to a loader, however, I'm not entirely sure.
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.
Shouldn't it be CanAddFetchedCollectionsToCache
? (Collection is switched to plural.)
If I understand well this PR, contrary to #460, it would disable collection caching for the whole query, not just for the collection having restrictions.
This probably needs to be moved to a loader, however, I'm not entirely sure.
I am not sure either. It may require to expose some internal state of the translator for the loader to analyse it, and then, better keep it in the translator.
} | ||
} | ||
|
||
public bool CanAddFetchedCollectionToCache |
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.
Shouldn't it be CanAddFetchedCollectionsToCache
? (Collection is switched to plural.)
If I understand well this PR, contrary to #460, it would disable collection caching for the whole query, not just for the collection having restrictions.
This probably needs to be moved to a loader, however, I'm not entirely sure.
I am not sure either. It may require to expose some internal state of the translator for the loader to analyse it, and then, better keep it in the translator.
Also add transactions since using second level cache without transactions is a bad practice.
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.
@bahusoid change is a good improvement in my opinion.
And do some minor cleanup
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.
Why WIP?
…ate-core into itmagination-NH-3848_HQL
But it seems to fully fix NH-3848 filter case (when collection is filtered by |
Let's call it another bug, if confirmed. |
This pull should be treated as a hint for fix or tests rather than actual fix (but maybe I'm wrong).
It can harm performance (traversing Where clause tree or using String.StartsWith).
Actually we aren't using HQL in our application so this fix had to be done quick.
NH-3848.
Fixes #1341