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:
parent
8e56a7a4d9
commit
7c9d0594f8
|
@ -534,7 +534,7 @@ module External {
|
||||||
})
|
})
|
||||||
// this is the response from knex if no rows found
|
// this is the response from knex if no rows found
|
||||||
const rows = !response[0].read ? response : []
|
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 }
|
related[storeTo] = { rows, isMany, tableId }
|
||||||
}
|
}
|
||||||
return related
|
return related
|
||||||
|
|
Loading…
Reference in New Issue