System.err.println ("CREATED KEY: "+key);
    public List getNodeIDs (Node home, Relation rel) throws Exception {	Transactor tx = (Transactor) Thread.currentThread ();	// tx.timer.beginEvent ("getNodeIDs "+home);	if (rel == null || rel.other == null || !rel.other.isRelational ()) {	    // this should never be called for embedded nodes	    throw new RuntimeException ("NodeMgr.getNodeIDs called for non-relational node "+home);	} else {	    List retval = new ArrayList ();	    // if we do a groupby query (creating an intermediate layer of groupby nodes),	    // retrieve the value of that field instead of the primary key	    String idfield = rel.groupby == null ? rel.other.getIDField () : rel.groupby;	    Connection con = rel.other.getConnection ();	    String table = rel.other.getTableName ();	    QueryDataSet qds = null;	    try {	        Relation subrel = rel;	        if (subrel.getSubnodeRelation () != null)	            subrel = subrel.getSubnodeRelation ();	        if (home.getSubnodeRelation() != null) {	            // subnode relation was explicitly set	            qds = new QueryDataSet (con, "SELECT "+idfield+" FROM "+table+" "+home.getSubnodeRelation());	        } else {	            String q = "SELECT "+idfield+" FROM "+table;	            if (subrel.direction == Relation.BACKWARD) {	                String homeid = home.getNonVirtualHomeID ();	                q += " WHERE "+subrel.getRemoteField()+" = '"+homeid+"'";	                if (subrel.filter != null)	                    q += " AND "+subrel.filter;	            } else if (subrel.filter != null)	                q += " WHERE "+subrel.filter;	            // set order, if specified and if not using subnode's relation	            if (rel.groupby != null)	                q += " GROUP BY "+rel.groupby+" ORDER BY "+(rel.groupbyorder == null ? rel.groupby : rel.groupbyorder);	            else if (rel.order != null)	                q += " ORDER BY "+rel.order;	            qds = new QueryDataSet (con, q);	        }	        if (logSql)	           app.logEvent ("### getNodeIDs: "+qds.getSelectString());	        qds.fetchRecords ();		        Key k = home.getKey ();	        for (int i=0; i<qds.size (); i++) {	            Record rec = qds.getRecord (i);	            String kstr = rec.getValue (1).asString ();	            // make the proper key for the object, either a generic DB key or a groupby key	            Key key = rel.groupby == null ?	            		(Key) new DbKey (rel.other, kstr) :	            		(Key) new SyntheticKey (k, kstr);	            System.err.println ("CREATED KEY: "+key);	            retval.add (new NodeHandle (key));	            // if these are groupby nodes, evict nullNode keys	            if (rel.groupby != null && cache.get (key) instanceof NullNode)	                evictKey (key);	        }	    } finally {	        // tx.timer.endEvent ("getNodeIDs "+home);	        if (qds != null) {	            qds.close ();	        }	    }	    return retval;	}    }