diff --git a/hsarback/src/de/hsadmin/cliClientConnector/CLIClientConnectorServlet.java b/hsarback/src/de/hsadmin/cliClientConnector/CLIClientConnectorServlet.java index f70e74f..63e475a 100644 --- a/hsarback/src/de/hsadmin/cliClientConnector/CLIClientConnectorServlet.java +++ b/hsarback/src/de/hsadmin/cliClientConnector/CLIClientConnectorServlet.java @@ -213,9 +213,12 @@ public class CLIClientConnectorServlet extends HttpServlet { while (wkeys.hasNext()) { String k = (String) wkeys.next(); String kname = hasGetter(eType, k); + String kvalue = ( (k.equals("id")) + ? ( AbstractEntity.escapeString(where.get(k)) ) + : ( "'" + AbstractEntity.escapeString(where.get(k)) + "'" ) ); if (kname != null) { rval += (first ? "" : " and ") - + "(obj." + AbstractEntity.escapeString(kname) + " = '" + AbstractEntity.escapeString(where.get(k)) + "')"; + + "(obj." + AbstractEntity.escapeString(kname) + " = " + kvalue + ")"; first = false; } else { throw new ServletException("illegal input (unknown field: " + k + ")");