@sequelize/postgres
Advanced tools
Comparing version 7.0.0-alpha.42 to 7.0.0-alpha.43
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import type { Sequelize } from '@sequelize/core'; | ||
@@ -3,0 +4,0 @@ import { AbstractDialect } from '@sequelize/core'; |
@@ -228,6 +228,6 @@ "use strict"; | ||
} | ||
if (rows[0]) { | ||
if (Array.isArray(rows) && rows[0]) { | ||
for (const attributeOrColumnName of Object.keys(rows[0])) { | ||
const modelDefinition = this.model.modelDefinition; | ||
const attribute = modelDefinition.attributes.get(attributeOrColumnName) ?? modelDefinition.columns.get(attributeOrColumnName); | ||
const attribute = modelDefinition.columns.get(attributeOrColumnName); | ||
const updatedValue = this._parseDatabaseValue( | ||
@@ -237,3 +237,3 @@ rows[0][attributeOrColumnName], | ||
); | ||
this.instance.set(attribute?.fieldName ?? attributeOrColumnName, updatedValue, { | ||
this.instance.set(attribute?.attributeName ?? attributeOrColumnName, updatedValue, { | ||
raw: true, | ||
@@ -240,0 +240,0 @@ comesFromDatabase: true |
@@ -35,3 +35,3 @@ { | ||
"type": "commonjs", | ||
"version": "7.0.0-alpha.42", | ||
"version": "7.0.0-alpha.43", | ||
"publishConfig": { | ||
@@ -41,4 +41,4 @@ "access": "public" | ||
"dependencies": { | ||
"@sequelize/core": "7.0.0-alpha.42", | ||
"@sequelize/utils": "7.0.0-alpha.42", | ||
"@sequelize/core": "7.0.0-alpha.43", | ||
"@sequelize/utils": "7.0.0-alpha.43", | ||
"@types/pg": "^8.11.4", | ||
@@ -54,3 +54,3 @@ "lodash": "^4.17.21", | ||
"devDependencies": { | ||
"@types/chai": "4.3.19", | ||
"@types/chai": "4.3.20", | ||
"@types/mocha": "10.0.8", | ||
@@ -60,3 +60,3 @@ "chai": "4.5.0", | ||
}, | ||
"gitHead": "4fd3f5c33e3dc1faecb8841d840a3ea2c327fc84" | ||
"gitHead": "1f38ae7e01e36d2497eb22eec78ea58e7bec7e31" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3007
285937
+ Added@sequelize/core@7.0.0-alpha.43(transitive)
+ Added@sequelize/utils@7.0.0-alpha.43(transitive)
+ Addedtype-fest@4.27.1(transitive)
- Removed@sequelize/core@7.0.0-alpha.42(transitive)
- Removed@sequelize/utils@7.0.0-alpha.42(transitive)
- Removedtype-fest@4.27.0(transitive)