parent
b55ccabba1
commit
4e0c131a27
|
@ -424,7 +424,7 @@ inList
|
|||
;
|
||||
|
||||
likeEscape
|
||||
: ESCAPE STRING_LITERAL
|
||||
: ESCAPE (STRING_LITERAL | parameter)
|
||||
;
|
||||
|
||||
|
||||
|
|
|
@ -99,6 +99,18 @@ public class ILikeTest {
|
|||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLikeEscapeParam(SessionFactoryScope scope) {
|
||||
scope.inTransaction(
|
||||
session -> {
|
||||
Query q = session.createQuery( "from BasicEntity be where be.data like 'Pr%$_%' escape :esc" )
|
||||
.setParameter("esc", "$");
|
||||
List l = q.getResultList();
|
||||
assertEquals( 2, l.size() );
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNotLikeEscape(SessionFactoryScope scope) {
|
||||
scope.inTransaction(
|
||||
|
|
Loading…
Reference in New Issue