1
0
Fork 0
mirror of synced 2024-06-02 18:44:54 +12:00

Fixing #6980 - fixing choice of relational foreign key field name when working with fields named differently to the primary key.

This commit is contained in:
mike12345567 2022-09-07 18:30:17 +01:00
parent 673c375934
commit c8468c39ea

View file

@ -534,7 +534,7 @@ module External {
})
// this is the response from knex if no rows found
const rows = !response[0].read ? response : []
const storeTo = isMany ? field.throughFrom || linkPrimaryKey : manyKey
const storeTo = isMany ? field.throughFrom || linkPrimaryKey : fieldName
related[storeTo] = { rows, isMany, tableId }
}
return related