HHH-17717 Add semicolon(`;`) to HQL_SEPARATORS
This commit is contained in:
parent
5309d9d63b
commit
a97b7ba611
|
@ -22,7 +22,7 @@ import org.hibernate.query.sql.spi.ParameterRecognizer;
|
|||
* @author Steve Ebersole
|
||||
*/
|
||||
public class ParameterParser {
|
||||
private static final String HQL_SEPARATORS = " \n\r\f\t,()=<>&|+-=/*'^![]#~\\";
|
||||
private static final String HQL_SEPARATORS = " \n\r\f\t,;()=<>&|+-=/*'^![]#~\\";
|
||||
private static final BitSet HQL_SEPARATORS_BITSET = new BitSet();
|
||||
|
||||
static {
|
||||
|
|
|
@ -182,6 +182,18 @@ public class ParameterParserTest {
|
|||
assertEquals( 2, recognizer.getNamedParameters().size() );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testParseNamedParameterEndWithSemicolon() {
|
||||
ExtendedParameterRecognizer recognizer = createRecognizer();
|
||||
NATIVE_QUERY_INTERPRETER.recognizeParameters("from Stock s where s.stockCode = :stockCode and s.xyz = :pxyz;", recognizer);
|
||||
recognizer.complete();
|
||||
recognizer.validate();
|
||||
|
||||
assertTrue(recognizer.getNamedParameters().contains("stockCode"));
|
||||
assertTrue(recognizer.getNamedParameters().contains("pxyz"));
|
||||
assertEquals( 2, recognizer.getNamedParameters().size() );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testParseJPAPositionalParameter() {
|
||||
ExtendedParameterRecognizer recognizer = createRecognizer();
|
||||
|
|
Loading…
Reference in New Issue