@@ -327,23 +327,27 @@ public String getHavingString() {
327327 method = expression .substring (0 , start );
328328
329329 if (StringUtil .isName (method ) == false ) {
330- throw new IllegalArgumentException ("字符 " + method + " 不合法!@having:\" function0(...)condition0;function1(...)condition1...\" "
330+ throw new IllegalArgumentException ("字符 " + method + " 不合法!"
331+ + "预编译模式下 @having:\" function0(arg0,arg1,...)operator value;function1(arg0,arg1,...)operator value\" "
331332 + " 中SQL函数名 function 必须符合正则表达式 ^[0-9a-zA-Z_]+$ !" );
332333 }
333334
334335 suffix = expression .substring (end + 1 , expression .length ());
335336
336337 if (isPrepared () && PATTERN_RANGE .matcher ((String ) suffix ).matches () == false ) {
337- throw new UnsupportedOperationException ("字符串 " + suffix + " 不合法!预编译模式下 @having:\" function0(...)condition0;function1(...)condition1...\" "
338+ throw new UnsupportedOperationException ("字符串 " + suffix + " 不合法!"
339+ + "预编译模式下 @having:\" function0(arg0,arg1,...)operator value;function1(arg0,arg1,...)operator value\" "
338340 + " 中 condition 必须符合正则表达式 ^[0-9%!=<>,]+$ !不允许空格!" );
339341 }
340342
341343 String [] ckeys = StringUtil .split (expression .substring (start + 1 , end ));
342344
343345 for (int j = 0 ; j < ckeys .length ; j ++) {
344346
345- if (isPrepared () && StringUtil .isName (ckeys [j ]) == false ) {
346- throw new IllegalArgumentException ("@having:'function0(arg0,arg1,...);function1(arg0,arg1,...)' 中所有 arg 都必须是1个单词!并且不要有空格!" );
347+ if (isPrepared () && (StringUtil .isName (ckeys [j ]) == false || ckeys [j ].startsWith ("_" ))) {
348+ throw new IllegalArgumentException ("字符 " + ckeys [j ] + " 不合法!"
349+ + "预编译模式下 @having:\" function0(arg0,arg1,...)operator value;function1(arg0,arg1,...)operator value\" "
350+ + " 中所有 arg 都必须是1个不以 _ 开头的单词!并且不要有空格!" );
347351 }
348352
349353 ckeys [j ] = getKey (ckeys [j ]);
0 commit comments