HHH-18575 Add test for issue
This commit is contained in:
parent
1d46b87008
commit
2e54d95707
|
@ -6,6 +6,7 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.orm.test.query.hql;
|
package org.hibernate.orm.test.query.hql;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -28,6 +29,7 @@ import jakarta.persistence.Id;
|
||||||
|
|
||||||
import static org.hamcrest.CoreMatchers.is;
|
import static org.hamcrest.CoreMatchers.is;
|
||||||
import static org.junit.Assert.assertThat;
|
import static org.junit.Assert.assertThat;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Andrea Boriero
|
* @author Andrea Boriero
|
||||||
|
@ -102,6 +104,20 @@ public class MultiValuedParameterTest extends BaseSessionFactoryFunctionalTest {
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Jira( "https://hibernate.atlassian.net/browse/HHH-18575" )
|
||||||
|
void testMultiValuedBigDecimals() {
|
||||||
|
inTransaction( session -> {
|
||||||
|
assertEquals(
|
||||||
|
1,
|
||||||
|
session.createQuery("SELECT 1 WHERE :value IN (:list)", Integer.class)
|
||||||
|
.setParameter( "value", BigDecimal.valueOf( 2.0))
|
||||||
|
.setParameter("list", List.of(BigDecimal.valueOf(2.0), BigDecimal.valueOf(3.0)))
|
||||||
|
.getSingleResult()
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@AfterAll
|
@AfterAll
|
||||||
public void cleanupData() {
|
public void cleanupData() {
|
||||||
inTransaction( session -> {
|
inTransaction( session -> {
|
||||||
|
|
Loading…
Reference in New Issue