Skip to content

Commit

Permalink
FAIRPC-29: fixed failing metadata request when no records found (#1478)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreenwood authored Jan 31, 2024
1 parent acdf5d3 commit d0bc331
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -412,12 +412,14 @@ private ViewRowCollection retrieveJoinTableRows(

var rows = new ViewRowCollection();

try (var query = getJoinQuery(view, joinView, joinedTable, joinTable, projectionColumns, ids);
var result = query.executeQuery()) {
while (result.next()) {
var id = result.getString("rowid");
var row = buildJoinRows(joinView, projectionColumns, result);
rows.add(id, row);
if (!ids.isEmpty()) {
try (var query = getJoinQuery(view, joinView, joinedTable, joinTable, projectionColumns, ids);
var result = query.executeQuery()) {
while (result.next()) {
var id = result.getString("rowid");
var row = buildJoinRows(joinView, projectionColumns, result);
rows.add(id, row);
}
}
}

Expand Down

0 comments on commit d0bc331

Please sign in to comment.