getNodeIDs always outputs its select statement if logsql=true.

Previously the statement was not logged if it contained an error.
This commit is contained in:
hns 2001-08-21 14:10:47 +00:00
parent 083bd0fe80
commit 02fb01a55e

View file

@ -599,17 +599,20 @@ public final class NodeManager {
QueryDataSet qds = null;
try {
String q = null;
if (home.getSubnodeRelation() != null) {
// subnode relation was explicitly set
qds = new QueryDataSet (con, "SELECT "+idfield+" FROM "+table+" "+home.getSubnodeRelation());
q = "SELECT "+idfield+" FROM "+table+" "+home.getSubnodeRelation();
} else {
String q = "SELECT "+idfield+" FROM "+table;
q += rel.buildQuery (home, home.getNonVirtualParent (), null);
qds = new QueryDataSet (con, q);
// let relation object build the query
q = "SELECT "+idfield+" FROM "+table + rel.buildQuery (home, home.getNonVirtualParent (), null);
}
if (logSql)
app.logEvent ("### getNodeIDs: "+qds.getSelectString());
app.logEvent ("### getNodeIDs: "+q);
qds = new QueryDataSet (con, q);
qds.fetchRecords ();