I want to save without affecting UpdateDateColumn when updating view column.
This table is a post table and the view is a hit.
UpdateDateColumn is updated when adding the number of view Column.
I don't want the view column to affect UpdateDateColumn.
@Entity("post")
export default class Post extends BaseEntity {
@PrimaryGeneratedColumn()
idx: number;
// Skip
@Column({
nullable: false,
default: 0
})
view: number;
@Column("timestampz")
@CreateDateColumn()
created_at: Date;
@Column("timestampz")
@UpdateDateColumn()
updated_at: Date;
}
Give me a solution please.