-
Notifications
You must be signed in to change notification settings - Fork 679
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
QuerydslDefaultBinding
should unwrap nested collections for IN
binding
#2834
Comments
To help you to diagnose the problem, please spend some time providing a minimal sample that reproduces the problem. |
see https://github.com/rxxy/springdatacommons-issue2834 |
The HQL query is:
The exception stack trace is:
This is either a Querydsl or a Hibernate issue as the Querydsl code in Spring Data hasn't changed and Querydsl is creating the actual query. |
The parsed predicateis
I think it would be better to adjust to normal predicate, wouldn't it? |
select sysUser HQL is correct, but the parameter should be an entity object, not a Set |
QuerydslPredicateBuilder
converts elements of set to Collection<Set<T>>
instead of Collection<T>
You're right, that Hibernate leniently accepted Set<Set<…>> and now it no longer does. We need to fix the issue. |
QuerydslPredicateBuilder
converts elements of set to Collection<Set<T>>
instead of Collection<T>
QuerydslDefaultBinding
should unwrap nested collections for IN
binding
It makes rather sense to unwrap nested collections in |
When binding values to collection-like paths, we now unwrap potentially double-wrapped collections as QuerydslPredicateBuilder attempts to convert the binding value to the type of the path. Our default is a contains binding for single elements. Closes #2834
When binding values to collection-like paths, we now unwrap potentially double-wrapped collections as QuerydslPredicateBuilder attempts to convert the binding value to the type of the path. Our default is a contains binding for single elements. Closes #2834
when i bind the parameter on a property of type set
The predicate expected to be generated:
id in sysUser.departments
The actual generated predicate
[id] in sysUser.departments
This problem works fine in hibernate5, but throws an exception in hibernate6
entity:
controller argument:
The text was updated successfully, but these errors were encountered: