[#586] fixed multiple nested relation expansions with shared base path

This commit is contained in:
Gani Georgiev
2022-09-21 13:34:34 +03:00
parent a1ad5004f8
commit 9a8c9dd115
14 changed files with 57 additions and 16 deletions

View File

@@ -108,6 +108,18 @@ func TestExpandRecords(t *testing.T) {
9,
0,
},
// expand multiple relations sharing a common root path
{
[]string{
"i15r5aa28ad06c8",
},
[]string{"manyrels.onerel.manyrels.onerel", "manyrels.onerel.onerel"},
func(c *models.Collection, ids []string) ([]*models.Record, error) {
return app.Dao().FindRecordsByIds(c, ids, nil)
},
4,
0,
},
// single expand
{
[]string{