fields = allFields;
}
Iterator itFields = fields.iterator();
while(itFields.hasNext()) {
DatabaseField field = (DatabaseField)itFields.next();
FieldDefinition fieldDef;
//bug3307, should use columnDefinition if it was defined.
if(field.getColumnDefinition().length() == 0){
fieldDef = new FieldDefinition(field.getName(), ConversionManager.getObjectClass(field.getType()));
}else{
fieldDef = new FieldDefinition(field.getName(), field.getColumnDefinition());
}
if(pkFields.contains(field) && shouldTempTableSpecifyPrimaryKeys()) {
fieldDef.setIsPrimaryKey(true);
}
tableDef.addField(fieldDef);
}
tableDef.setCreationPrefix(getCreateTempTableSqlPrefix());
tableDef.setName(getTempTableForTable(table).getQualifiedName());