Skip to content

Commit 5799ddd

Browse files
authored
Fixes errors with custom fieldNames
When you use sequelize with a custom fieldName different from the backing field, all the records will faill to logging the error: 'You have to specify "recordId" for record action'.
1 parent 6ba562e commit 5799ddd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/property.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ const TYPES_MAPPING = [
2727

2828
class Property extends BaseProperty {
2929
constructor(sequelizePath) {
30-
super({ path: sequelizePath.field })
30+
super({ path: sequelizePath.fieldName })
3131
this.sequelizePath = sequelizePath
3232
}
3333

3434
name() {
35-
return this.sequelizePath.field
35+
return this.sequelizePath.fieldName
3636
}
3737

3838
isEditable() {

0 commit comments

Comments
 (0)