HSAdmin Backend Domains, E-Mail, Datenbanken
Purodha Blissenbach
2012-09-21 e0ee6fe431d42d7025244ba06bda71f754f1a500
values of where-paremeters named "id" are now treated as numbers when
reading from command line client. This is a guess-based trial.
1 files modified
5 ■■■■ changed files
hsarback/src/de/hsadmin/cliClientConnector/CLIClientConnectorServlet.java 5 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/cliClientConnector/CLIClientConnectorServlet.java
@@ -213,9 +213,12 @@
        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 + ")");