values of where-paremeters named "id" are now treated as numbers when
reading from command line client. This is a guess-based trial.
This commit is contained in:
parent
7be61f856c
commit
e0ee6fe431
@ -213,9 +213,12 @@ public class CLIClientConnectorServlet extends HttpServlet {
|
|||||||
while (wkeys.hasNext()) {
|
while (wkeys.hasNext()) {
|
||||||
String k = (String) wkeys.next();
|
String k = (String) wkeys.next();
|
||||||
String kname = hasGetter(eType, k);
|
String kname = hasGetter(eType, k);
|
||||||
|
String kvalue = ( (k.equals("id"))
|
||||||
|
? ( AbstractEntity.escapeString(where.get(k)) )
|
||||||
|
: ( "'" + AbstractEntity.escapeString(where.get(k)) + "'" ) );
|
||||||
if (kname != null) {
|
if (kname != null) {
|
||||||
rval += (first ? "" : " and ")
|
rval += (first ? "" : " and ")
|
||||||
+ "(obj." + AbstractEntity.escapeString(kname) + " = '" + AbstractEntity.escapeString(where.get(k)) + "')";
|
+ "(obj." + AbstractEntity.escapeString(kname) + " = " + kvalue + ")";
|
||||||
first = false;
|
first = false;
|
||||||
} else {
|
} else {
|
||||||
throw new ServletException("illegal input (unknown field: " + k + ")");
|
throw new ServletException("illegal input (unknown field: " + k + ")");
|
||||||
|
Loading…
Reference in New Issue
Block a user