-
Notifications
You must be signed in to change notification settings - Fork 286
Open
Description
Versions
- sequelize: 5.21.7
- sequelize-typescript: 1.1.0
- typescript: 3.8.3
I'm submitting a ...
[ ] bug report
[x] feature request
Actual behavior:
Overriding the instance method toJSON
is possible in sequelize, not with sequelize-typescript
Expected behavior:
Possibility to override the toJSON
instance method
Steps to reproduce:
Related code:
export class Test extends Model<Test> {
@Column
name: string;
@Column
shouldBeHidden: string;
toJSON() {
const values = Object.assign({}, this.get());
delete values.shouldBeHidden;
return values;
}
}
//returns when serialized
//{ "name": "foo" }
Metadata
Metadata
Assignees
Labels
No labels