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 66 */
77package org .hibernate .orm .test .query .hql ;
88
9+ import java .math .BigDecimal ;
910import java .math .BigInteger ;
1011import java .time .LocalDate ;
1112import java .util .ArrayList ;
2829
2930import static org .hamcrest .CoreMatchers .is ;
3031import static org .junit .Assert .assertThat ;
32+ import static org .junit .jupiter .api .Assertions .assertEquals ;
3133
3234/**
3335 * @author Andrea Boriero
@@ -102,6 +104,20 @@ public void test() {
102104 } );
103105 }
104106
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+
105121 @ AfterAll
106122 public void cleanupData () {
107123 inTransaction ( session -> {
You can’t perform that action at this time.
0 commit comments