for( DBIdentifier secTableName : colsMappedToSecTable.keySet()) {
FieldMapping fm = colsMappedToSecTable.get(secTableName);
// select only the PK columns, since we just want to lock
Select select = factory.newSelect();
select.select(fm.getColumns());
select.whereForeignKey(fm.getJoinForeignKey(), id, mapping, _store);
sqls.add(select.toSelect(true, fetch));
}
}
return sqls;
}