-
Notifications
You must be signed in to change notification settings - Fork 869
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
The transform method throws a ClassCastException when working with joinFetch since 4.4.0 #3264
Comments
You're only allowed to Instead of throwing an exception Hibernate probably implicitly adds the children to the selection but this unfortunately means that the output from the query differs from what Querydsl expects. Adding the child relation to your projection should fix the issue. |
I'm pretty sure this is actually a bug in Hibernate. The
while
To work around this I've changed the
to
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@miki1029 |
…inFetch since 4.4.0 (#534) * ported fix for #3264 querydsl/querydsl#3264 from https://github.com/aasyspl/querydsl * test for regression querydsl/querydsl#3264 * Allow test to throw exceptions when needed * Move logic for tuple creation to TupleUtils --------- Co-authored-by: sapolinarski <s.apolinarski@aasys.pl> Co-authored-by: Marvin Froeder <velo.br@gmail.com>
…inFetch (#536) * ported fix for #3264 querydsl/querydsl#3264 from https://github.com/aasyspl/querydsl * test for regression querydsl/querydsl#3264 * Allow test to throw exceptions when needed * Move logic for tuple creation to TupleUtils * Code suggestions * Using try-with-resources on group by transformers --------- Co-authored-by: sapolinarski <s.apolinarski@aasys.pl> Co-authored-by: Kamil Krzywanski <kamilkrzywanski01@gmail.com>
Observed vs. expected behavior
The transform method throws a ClassCastException when working with joinFetch.
Steps to reproduce
I upload code here.
https://github.com/miki1029/querydsl-transform-bug
Environment
https://github.com/miki1029/querydsl-transform-bug/blob/master/build.gradle
Querydsl version: 5.0.0 (I got the same error in 4.4.0, not in 4.3.1.)
Querydsl module:
Database: H2
JDK: openjdk11
Additional details
The text was updated successfully, but these errors were encountered: