Use quotes when looking up a relational node by ID and the ID column is a

type that requires values to be put in quotes.
Fixes bug 199 http://helma.org/bugs/show_bug.cgi?id=199
This commit is contained in:
hns 2003-01-13 11:32:22 +00:00
parent 26a6fb4682
commit 63bcb750a3

View file

@ -1084,7 +1084,13 @@ public final class NodeManager {
q.append ("WHERE "); q.append ("WHERE ");
q.append (idfield); q.append (idfield);
q.append (" = "); q.append (" = ");
q.append (kstr); if (dbm.needsQuotes (idfield)) {
q.append ("'");
q.append (escape(kstr));
q.append ("'");
} else {
q.append (kstr);
}
if (logSql) if (logSql)
app.logEvent ("### getNodeByKey: "+q.toString()); app.logEvent ("### getNodeByKey: "+q.toString());