fix(09-04): keep relation columns out of the default sort set

- A relation column is not sortable unless columns.yaml says so
- An explicit sortable relation orders the joined select column, then the primary key
This commit is contained in:
Jakub Zych
2026-09-24 19:04:42 +02:00
parent 6a57f63e81
commit 3efdcc1c59
2 changed files with 16 additions and 5 deletions

View File

@@ -227,7 +227,7 @@ func compileColumns(pluginID string, ctl pact.AdminController, fsys fs.FS, colPa
return nil, bootErr(pluginID, ctl.ID(), colPath, fmt.Errorf("column %s is not on the model", key))
}
}
sortable := true
sortable := spec.Relation == ""
if spec.Sortable != nil {
sortable = *spec.Sortable
}