代码测试修正

This commit is contained in:
inrgihc
2023-11-20 22:45:47 +08:00
parent f90c2a13a5
commit a18e21c4c1
10 changed files with 22 additions and 14 deletions

View File

@@ -73,7 +73,11 @@ public class MongodbTableDataWriteProvider extends DefaultTableDataWriteProvider
for (Object[] row : recordValues) {
Map<String, Object> columns = new LinkedHashMap<>(fieldCount);
for (int i = 0; i < fieldCount; ++i) {
columns.put(fieldNames.get(i), row[i]);
if (row[i] != null && row[i].getClass().getName().equals("org.bson.types.ObjectId")) {
columns.put(fieldNames.get(i), String.valueOf(row[i]));
} else {
columns.put(fieldNames.get(i), row[i]);
}
}
rows.add(columns);
}