sql = buildSqlForTable(table);
if(debug_log!=null)writeLog("nField= " + nField);
if(debug_log!=null)writeLog("SQL for table \"" + table.getName() + "\": " + sql);
PreparedStatementCache statementCache = getStatementCacheForTable(table);
stmt = statementCache.getPreparedStatement(sql);
statementMustBeClosedByMe = statementCache.mustLastReturnedStatementBeClosedByCaller();
List<Pair<Integer, CROM>> linkKeyIndices = collectLinkKeyIndices(table);
if (linkKeyIndices.isEmpty()) {
handleMissingLinkKeys(parentTable, table);
}
Record[] parent_array=parents.toArray(new Record[parents.size()]);