-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
HHH-19925 - Locking root(s) should be based on select-clause, not from-clause #11239
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
base: main
Are you sure you want to change the base?
Conversation
|
At the moment, this just handles the collection of "root" selections which are entities[1] and exposes them from the [1] It does not yet cover entity selectiions as part of dynamic instantiation... |
|
Second push now collects "root paths for locking" for both (1) entity selections and (2) path selections rooted at an entity, as well as either occuring as an argument in dynamic instantiation. Will work on tying this in with the previous pessimistic locking work. |
| } | ||
| } | ||
|
|
||
| private void collectRootPathsForLocking(SqmPath<?> selectedPath) { |
Check notice
Code scanning / CodeQL
Confusing overloading of methods Note
collectRootPathsForLocking
| } | ||
| } | ||
|
|
||
| private void collectRootPathsForLocking(SqmDynamicInstantiation<?> dynamicInstantiation) { |
Check notice
Code scanning / CodeQL
Confusing overloading of methods Note
collectRootPathsForLocking
Nice. |
|
With this 3rd push, this now works purely in terms of the singular expectation from the Jira. I have a feeling other tests may fail with no-longer-accurate assumptions on some databases, so let's see what CI says. In terms of implementation, I was able to make this pretty low impact which I was happy with. I had to change to make QuerySpec be the thing that carries around the "root paths for locking" to make it easier to integrate into the SQL AST translation, which is fine; but a little leery that you need to add these iteratively to the QuerySpec (which are generally built eagerly) as opposed to passing as ctor args - just means it is eassier to miss in some code paths. |
ff3aeed to
8dfcd2a
Compare
8dfcd2a to
d3b777f
Compare
HHH-19925 - Locking root(s) should be based on select-clause, not from-clause
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.
https://hibernate.atlassian.net/browse/HHH-19925