Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,17 @@ protected List<TableDTO> buildTableListFromDocuments(List<Document> documents) {
dto.setName((String) meta.get("name"));
dto.setDescription((String) meta.get("description"));
if (meta.containsKey("primaryKey")) {
String primaryKey = (String) meta.get("primaryKey");
if (StringUtils.isNotBlank(primaryKey)) {
dto.setPrimaryKeys(List.of(primaryKey));
Object primaryKeyObj = meta.get("primaryKey");
if (primaryKeyObj instanceof List) {
@SuppressWarnings("unchecked")
List<String> primaryKeys = (List<String>) primaryKeyObj;
dto.setPrimaryKeys(primaryKeys);
}
else if (primaryKeyObj instanceof String) {
String primaryKey = (String) primaryKeyObj;
if (StringUtils.isNotBlank(primaryKey)) {
dto.setPrimaryKeys(List.of(primaryKey));
}
}
}
tableList.add(dto);
Expand Down
Loading