private static void resolvePks(IDatabaseConnection connection, EntityDependencyGraph edg,
DependencyInclusionResolver inclusionResolver, Map<Class<?>, Set<ColumnValues>> primaryPks,
ColumnValuesTableMap resolvedPks) throws SQLException {
for (Map.Entry<Class<?>, Set<ColumnValues>> entry : primaryPks.entrySet()) {
Node node = edg.getNode(entry.getKey());
Set<ColumnValues> pks = entry.getValue();
//check that the pk columns have defined names from the user
if (pks != null) {
for (ColumnValues pk : pks) {
int idx = 0;
for (ColumnValues.Column col : pk) {
if (col.getName() == null) {
col.setName(node.getTranslation().getPkColumns()[idx]);
}
idx++;
}
}