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

[clarification]: Can I mix parameters in the Query? #732

Closed
Tracked by #713
otaviojava opened this issue May 8, 2024 · 2 comments · Fixed by #733
Closed
Tracked by #713

[clarification]: Can I mix parameters in the Query? #732

otaviojava opened this issue May 8, 2024 · 2 comments · Fixed by #733
Labels
question Further information is requested

Comments

@otaviojava
Copy link
Contributor

Specification

https://github.com/jakartaee/data/blob/main/spec/src/main/asciidoc/query-language.asciidoc#parameters

I need clarification on ...

The spec does not clarify whether we can combine the original with the named parameter.

I did not find any combination on the internet or in our specs, so I assume they cannot mix.

Based on my understanding, if there is an ordinal, all parameters should be ordinal. This is my current interpretation of the situation.

Does it make sense?

Additional information

No response

@otaviojava otaviojava added the question Further information is requested label May 8, 2024
@gavinking
Copy link
Contributor

Ah, this is a very good point. Nice catch.

So, in our implementation we do let you mix named and positional parameters.

However, the JPA spec says:

Positional and named parameters must not be mixed in a single query.

(Section 4.7.4 of JPA 3.2.)

So we should add that same restriction to the spec for JDQL.

@otaviojava
Copy link
Contributor Author

Ah, this is a very good point. Nice catch.

So, in our implementation we do let you mix named and positional parameters.

However, the JPA spec says:

Positional and named parameters must not be mixed in a single query.

(Section 4.7.4 of JPA 3.2.)

So we should add that same restriction to the spec for JDQL.

Ok, I will open a PR with this information.

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

Successfully merging a pull request may close this issue.

2 participants