mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2026-01-03 10:24:26 +00:00
Fixed SingleRecordAsObject true when handleRead with no id
This commit is contained in:
@@ -267,7 +267,7 @@ func (h *Handler) parseOptionsFromHeaders(r common.Request, model interface{}) E
|
||||
h.resolveRelationNamesInOptions(&options, model)
|
||||
}
|
||||
|
||||
//Always sort according to the primary key if no sorting is specified
|
||||
// Always sort according to the primary key if no sorting is specified
|
||||
if len(options.Sort) == 0 {
|
||||
pkName := reflection.GetPrimaryKeyName(model)
|
||||
options.Sort = []common.SortOption{{Column: pkName, Direction: "ASC"}}
|
||||
|
||||
Reference in New Issue
Block a user