Skip to content
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

[OPENJPA-2668] fix for execution of a CriteriaQuery leaking into CriteriaQuery state #40

Closed

Conversation

michaelwiles
Copy link

@michaelwiles michaelwiles commented Apr 24, 2019

for OPENJPA-2668
added copy method to Expressons.In and use that to return the expression
so that the original is not changed.

Not sure if there's a better way to do this. This is quite how can I say, simple?

This is the only Expression that I could find that dirties the original CriteriaQuery and I'm fairly convinced that this shouldn't happen.

Prior to this fix, executing the test would change the query and replace the parameter with the hydrated parameter values.

@michaelwiles michaelwiles changed the title fix and test for https://issues.apache.org/jira/browse/OPENJPA-2668 [OPENJPA-2668](https://issues.apache.org/jira/browse/OPENJPA-2668) fix and test for this Apr 24, 2019
@michaelwiles michaelwiles changed the title [OPENJPA-2668](https://issues.apache.org/jira/browse/OPENJPA-2668) fix and test for this [OPENJPA-2668] fix and test for this Apr 24, 2019
@michaelwiles michaelwiles changed the title [OPENJPA-2668] fix and test for this [OPENJPA-2668] fix for execution of a CriteriaQuery leaking into CriteriaQuery state Apr 24, 2019
@ilgrosso
Copy link
Member

Thanks @michaelwiles for your contribution.
Would you please adjust openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/Expressions.java so that only effective modifications are submitted? I see large changes due to formatting, ATM.

@michaelwiles
Copy link
Author

hmmm... I'm going to create another pull request... this one is too broken to fix.

@michaelwiles michaelwiles deleted the feature/OPENJPA-2668 branch April 24, 2019 11:55
@michaelwiles
Copy link
Author

remade here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants