fix a test which was failing on h2 version 1.x
This commit is contained in:
parent
e125a818e3
commit
5a07e2b61d
|
@ -60,8 +60,12 @@ public class StringArrayContributorTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAsQueryParameter(SessionFactoryScope scope) {
|
public void testAsQueryParameter(SessionFactoryScope scope) {
|
||||||
|
scope.getSessionFactory().getQueryEngine()
|
||||||
|
.getSqmFunctionRegistry()
|
||||||
|
.registerNamed("array_contains",
|
||||||
|
scope.getSessionFactory().getTypeConfiguration().standardBasicTypeForJavaType(Boolean.class));
|
||||||
scope.inTransaction( (session) -> {
|
scope.inTransaction( (session) -> {
|
||||||
session.createQuery( "select p from Post p where array_contains(:arr, p.title) = true" )
|
session.createQuery( "select p from Post p where array_contains(:arr, p.title) = true" )
|
||||||
.setParameter( "arr", Arrays.array( "a", "b" ) )
|
.setParameter( "arr", Arrays.array( "a", "b" ) )
|
||||||
.list();
|
.list();
|
||||||
} );
|
} );
|
||||||
|
|
Loading…
Reference in New Issue