-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Closed
Labels
Description
Issue type:
[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql / mariadb
[ ] oracle
[x] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo
TypeORM version:
[x] latest
[ ] @next
[ ] 0.x.x (or put your version here)
Steps to reproduce or a small repository showing the problem:
I have an entity with some fields of json object and array type. like:
@Column({ type: 'jsonb', default: {} })
data: object;
@Column({ default: '{}', type: 'text', array: true)
inventoryAvatars: string[];
@Column({ default: '{}', type: 'text', array: true)
inventoryEmoji: string[];and a subscriber
@EventSubscriber()
export class UserSubscriber implements EntitySubscriberInterface<User> {
listenTo() {
return User;
}
afterUpdate(event: UpdateEvent<User>): Promise<any> | void {
console.log(event.updatedColumns.map(x=>x.propertyName));
}
}now I found that after any changes made, all array/object type fields are in event.updatedColumns. even they are not modified.