refactored Record.data and Record.expand to be concurrent safe

This commit is contained in:
Gani Georgiev
2023-01-25 22:39:42 +02:00
parent 39df263a03
commit ae371e8481
38 changed files with 313 additions and 88 deletions
+2
View File
@@ -97,6 +97,8 @@ func (dao *Dao) expandRecords(records []*models.Record, expandPath string, fetch
recordIds[i] = record.Id
}
// @todo after the index optimizations consider allowing
// indirect expand for multi-relation fields
indirectRecords, err := dao.FindRecordsByExpr(
indirectRel.Id,
dbx.In(inflector.Columnify(matches[2]), recordIds...),