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

Path.get(PluralAttribute<X, C, E>) lower bound missing on X #108

Closed
lukasj opened this issue Apr 28, 2015 · 4 comments · Fixed by #173
Closed

Path.get(PluralAttribute<X, C, E>) lower bound missing on X #108

lukasj opened this issue Apr 28, 2015 · 4 comments · Fixed by #173
Labels
bug Something isn't working incompatible fix is backwards incompatible Priority: Minor

Comments

@lukasj
Copy link
Contributor

lukasj commented Apr 28, 2015

Path interface declares:

<E, C extends java.util.Collection> Expression get(PluralAttribute<X, C, E> collection);

it should be instead

<E, C extends java.util.Collection> Expression get(PluralAttribute<? super X, C, E> collection);

with lower bound on X.
The same apply on Path.get(MapAttribute<X, K, V>).

@lukasj
Copy link
Contributor Author

lukasj commented Apr 28, 2015

@glassfishrobot Commented
Reported by mmariotti

@lukasj
Copy link
Contributor Author

lukasj commented May 5, 2017

@glassfishrobot Commented
This issue was imported from java.net JIRA JPA_SPEC-108

@lukasj
Copy link
Contributor Author

lukasj commented Jan 30, 2018

@krichter722 Commented
This concern has been raised in 2012 at http://download.oracle.com/javaee-archive/jpa-spec.java.net/users/2012/11/0523.html (and has been ignored) and discussed again at https://stackoverflow.com/questions/44604886/how-specify-a-jpa-criteria-api-with-member-in-and-a-many-to-many-relationship which provides a SSCCE for the issue and the proposed fix.

@lukasj
Copy link
Contributor Author

lukasj commented Aug 31, 2018

@lukasj lukasj added bug Something isn't working incompatible fix is backwards incompatible and removed Type: Bug labels Dec 2, 2021
lukasj pushed a commit that referenced this issue Jul 11, 2023
Add lower type bounds to the entity argument X of the return value of
Path.get(PluralAttribute) and Path.get(MapAttribute). The absense of
these lower bounds prevent usage of the JPA criteria API for a
collection field f which is declared in an entity A which then is
extended by another entity B and used in the type bounds of TypedQuery.

closes #108

Signed-off-by: Karl-Philipp Richter <krichter@posteo.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working incompatible fix is backwards incompatible Priority: Minor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant