Skip to content

Fix AND/OR negation logic in hql #3328

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

Merged
merged 9 commits into from
Jul 20, 2023
Merged

Conversation

csharper2010
Copy link
Contributor

@csharper2010 csharper2010 commented Jun 20, 2023

AND/OR below NOT must use result of subsequent NegateNode calls to create a new result node instead of partially mutating the existing node to consider functional signature of the NegateNode method

Fixes #3327

csharper2010 and others added 2 commits June 20, 2023 09:26
AND/OR below NOT must use result of subsequent NegateNode calls
to create a new result node instead of partially mutating the existing
node to consider functional signature of the NegateNode method
@bahusoid
Copy link
Member

Hibernate similar fix for reference: hibernate/hibernate-orm@aac7e3e

@fredericDelaporte
Copy link
Member

For inclusion in 5.4.x as asked in its corresponding issue, #3327, it would need to target the 5.4.x branch and being based on it.

The test case needs to be fixed for some databases too. (I have not checked what is the trouble. It could be that they cannot support what the test does. In such case the test needs likely to do some feature support checks as done in some other tests. It needs investigation.)

Doing this will not guarantee we will merge it in 5.4.x: there is always a risk of introducing some new regression with each change. Ideally 5.4.x releases are meant to stabilize (fix regressions) the 5.4 minor version. Additional fixes added into it may delay its stabilization. And also, adding new fixes in it instead of vNext (5.5) is not an incentive to finish 5.5.

Still we do it sometimes.

@csharper2010
Copy link
Contributor Author

The test case needs to be fixed for some databases too. (I have not checked what is the trouble. It could be that they cannot support what the test does. In such case the test needs likely to do some feature support checks as done in some other tests. It needs investigation.)

There seems to pe a foreign key problem on setup of the entities or the db structure is not generated as expected. I will have a look next week.

@fredericDelaporte fredericDelaporte mentioned this pull request Jul 2, 2023
@bahusoid bahusoid changed the title Fixes #3327 Fix AND/OR negation logic in hql Jul 4, 2023
bahusoid
bahusoid previously approved these changes Jul 18, 2023
@fredericDelaporte fredericDelaporte added this to the 5.5 milestone Jul 18, 2023
@bahusoid bahusoid enabled auto-merge (squash) July 19, 2023 11:14
@bahusoid bahusoid merged commit 0fdb589 into nhibernate:master Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HqlParser does not correctly negate EXISTS-nodes below an AND/OR
4 participants