Raman Kreidzich (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5cbe15f...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiOGJjYmI5ODM0...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-14121?atlOrigin=eyJpIjoiOGJjYm...
) HHH-14121 (
https://hibernate.atlassian.net/browse/HHH-14121?atlOrigin=eyJpIjoiOGJjYm...
) Params from main orderBy query are trying to be inserted to subselect query
->parameter index out of range (
https://hibernate.atlassian.net/browse/HHH-14121?atlOrigin=eyJpIjoiOGJjYm...
)
Change By: Raman Kreidzich (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5cbe15f...
)
There are two entities: Post and Comment.
Post has collection of comments that are selected in subselect query:
{{ @OneToMany(mappedBy = "post", fetch = FetchType.EAGER, cascade =
CascadeType.MERGE) }}
{{ @Fetch(value = FetchMode.SUBSELECT) }}
{{ private List<Comment> comments;}}
When Post entities are selected by CriteriaQuery with specific 'orderBy'
expression that contains params (see fragment below), exception ' SQLException
_SQLException : Parameter index out of range (1 > number of parameters, which is 0). _
' is thrown.
{{Order order = builder.desc(builder.coalesce(root.get("name"),
"default_name")); }}
{{ query.orderBy(order);}}
ORMUnitTestCase: [
https://github.com/hibernate/hibernate-test-case-templates/pull/35
|https://github.com/hibernate/hibernate-test-case-templates/pull/35]
(
https://hibernate.atlassian.net/browse/HHH-14121#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-14121#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100140- sha1:fbb0377 )