|
|
|
@ -230,14 +230,17 @@ export default class Model implements TableType {
|
|
|
|
|
model.meta = parseMetaProp(model); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// set cache based on source_id presence
|
|
|
|
|
if (source_id) { |
|
|
|
|
await NocoCache.setList( |
|
|
|
|
CacheScope.MODEL, |
|
|
|
|
[base_id, source_id], |
|
|
|
|
modelList, |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
await NocoCache.setList(CacheScope.MODEL, [base_id], modelList); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
modelList.sort( |
|
|
|
|
(a, b) => |
|
|
|
|
(a.order != null ? a.order : Infinity) - |
|
|
|
|