@@ -441,7 +441,7 @@ module.exports = Adapter => class PostgreSQLAdapter extends Adapter {
441441 const client = this . client
442442 const typeMap = this . options . typeMap
443443 const primaryKey = this . keys . primary
444- const recordTypes = this . recordTypes
444+ const recordType = this . recordTypes [ type ]
445445
446446 // This is a little bit wrong, it is only safe to update within a
447447 // transaction. It's not possible to put it all in one update statement,
@@ -452,7 +452,7 @@ module.exports = Adapter => class PostgreSQLAdapter extends Adapter {
452452 let set = [ ]
453453
454454 for ( const field in update . replace ) {
455- if ( ! ( field in recordTypes [ type ] ) ) continue
455+ if ( ! recordType . propertyIsEnumerable ( field ) ) continue
456456 const value = update . replace [ field ]
457457 index ++
458458 if ( Array . isArray ( value ) ) parameters . push ( value . map ( inputValue ) )
@@ -461,7 +461,7 @@ module.exports = Adapter => class PostgreSQLAdapter extends Adapter {
461461 }
462462
463463 for ( const field in update . push ) {
464- if ( ! ( field in recordTypes [ type ] ) ) continue
464+ if ( ! recordType . propertyIsEnumerable ( field ) ) continue
465465 const value = update . push [ field ]
466466 index ++
467467
@@ -476,7 +476,7 @@ module.exports = Adapter => class PostgreSQLAdapter extends Adapter {
476476 }
477477
478478 for ( const field in update . pull ) {
479- if ( ! ( field in recordTypes [ type ] ) ) continue
479+ if ( ! recordType . propertyIsEnumerable ( field ) ) continue
480480 const value = update . pull [ field ]
481481
482482 if ( Array . isArray ( value ) ) {
0 commit comments