Skip to content

Commit

Permalink
fixed issue typeorm#8747
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenvandeweyer committed Mar 14, 2022
1 parent 486f8c5 commit 712e9e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/query-builder/UpdateQueryBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,12 +395,12 @@ export class UpdateQueryBuilder<Entity> extends QueryBuilder<Entity> implements

columns.forEach(column => {
if (!column.isUpdate || updatedColumns.includes(column)) { return; }

updatedColumns.push(column);

//
let value = column.getEntityValue(valuesSet);
if (column.referencedColumn && value instanceof Object && !(value instanceof Buffer)) {
if (column.referencedColumn && value instanceof Object && !(value instanceof Date) && !(value instanceof Buffer)) {
value = column.referencedColumn.getEntityValue(value);
} else if (!(value instanceof Function)) {
value = this.connection.driver.preparePersistentValue(value, column);
Expand Down

0 comments on commit 712e9e1

Please sign in to comment.