File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
hibernate-core/src/test/java/org/hibernate/orm/test/query/hql Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 6
6
*/
7
7
package org .hibernate .orm .test .query .hql ;
8
8
9
+ import java .math .BigDecimal ;
9
10
import java .math .BigInteger ;
10
11
import java .time .LocalDate ;
11
12
import java .util .ArrayList ;
28
29
29
30
import static org .hamcrest .CoreMatchers .is ;
30
31
import static org .junit .Assert .assertThat ;
32
+ import static org .junit .jupiter .api .Assertions .assertEquals ;
31
33
32
34
/**
33
35
* @author Andrea Boriero
@@ -102,6 +104,20 @@ public void test() {
102
104
} );
103
105
}
104
106
107
+ @ Test
108
+ @ Jira ( "https://hibernate.atlassian.net/browse/HHH-18575" )
109
+ void testMultiValuedBigDecimals () {
110
+ inTransaction ( session -> {
111
+ assertEquals (
112
+ 1 ,
113
+ session .createQuery ("SELECT 1 WHERE :value IN (:list)" , Integer .class )
114
+ .setParameter ( "value" , BigDecimal .valueOf ( 2.0 ))
115
+ .setParameter ("list" , List .of (BigDecimal .valueOf (2.0 ), BigDecimal .valueOf (3.0 )))
116
+ .getSingleResult ()
117
+ );
118
+ });
119
+ }
120
+
105
121
@ AfterAll
106
122
public void cleanupData () {
107
123
inTransaction ( session -> {
You can’t perform that action at this time.
0 commit comments