/* 1012 */ sql.append("CREATE TABLE ").append(cmrField.getQualifiedTableName()).append(" (").append(SQLUtil.getCreateTableColumnsClause(fieldsArr));
/* */
/* 1018 */ JDBCRelationMetaData relationMetaData = cmrField.getMetaData().getRelationMetaData();
/* 1019 */ if (relationMetaData.hasPrimaryKeyConstraint())
/* */ {
/* 1021 */ JDBCFunctionMappingMetaData pkConstraint = this.manager.getMetaData().getTypeMapping().getPkConstraintTemplate();
/* */
/* 1023 */ if (pkConstraint == null)
/* */ {
/* 1025 */ throw new IllegalStateException("Primary key constraint is not allowed for this type of data store");
/* */ }
/* */
/* 1028 */ String name = "pk_" + relationMetaData.getDefaultTableName();
/* 1029 */ name = SQLUtil.fixConstraintName(name, dataSource);
/* 1030 */ String[] args = { name, SQLUtil.getColumnNamesClause(fieldsArr, 100, new StringBuffer()).toString() };
/* */
/* 1034 */ sql.append(", ");
/* 1035 */ pkConstraint.getFunctionSql(args, sql);
/* */ }
/* 1037 */ sql.append(')');
/* 1038 */ return sql.toString();
/* */ }