stmt.setNull(internalCount++, columns[j].getSqlType());
}
} else if (value instanceof Identity) {
Identity identity = (Identity) value;
if (identity.size() != columns.length) {
throw new PersistenceException("Size of identity field mismatch!");
}
for (int j = 0; j < columns.length; j++) {
SQLTypeInfos.setValue(stmt, internalCount++,
columns[j].toSQL(identity.get(j)), columns[j].getSqlType());
}
} else {
if (columns.length != 1) {
throw new PersistenceException("Complex field expected!");
}
SQLTypeInfos.setValue(stmt, internalCount++, columns[0].toSQL(value),
columns[0].getSqlType());
}
}