Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typeorm delete date column

/* 
* Special column that is automatically set to the entity's 
*  delete time each time you call soft-delete of entity 
*  manager or repository. 
* You don't need to set this column - it will be automatically set.
* TypeORM's own soft delete functionality utilizes global 
*  scopes to only pull "non-deleted" entities from the database.
* If the @DeleteDateColumn is set, the default scope will be "non-deleted".
*/
@Entity()
export class User {

    @DeleteDateColumn()
    deletedDate: Date;

}
Source by orkhan.gitbook.io #
 
PREVIOUS NEXT
Tagged: #typeorm #delete #date #column
ADD COMMENT
Topic
Name
4+2 =