We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
SequelizeModel.primaryKeyField
1 parent 8b1fa6f commit 3160c20Copy full SHA for 3160c20
src/resource.js
@@ -62,7 +62,9 @@ class Resource extends BaseResource {
62
const ids = baseRecords.map(baseRecord => (
63
baseRecord.param(property.name())
64
))
65
- const records = await this.SequelizeModel.findAll({ where: { id: ids } })
+ const records = await this.SequelizeModel.findAll({
66
+ where: { [this.SequelizeModel.primaryKeyField]: ids },
67
+ })
68
const recordsHash = records.reduce((memo, record) => {
69
memo[record.id] = record
70
return memo
0 commit comments