From 343f2f1f332f9e5328dbd01166b7acc00927b8ce Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 13 Apr 2019 20:02:31 +0900 Subject: [PATCH] Fix bug --- src/models/entities/auth-session.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/models/entities/auth-session.ts b/src/models/entities/auth-session.ts index 83f8365630..4eec27e3f6 100644 --- a/src/models/entities/auth-session.ts +++ b/src/models/entities/auth-session.ts @@ -19,11 +19,15 @@ export class AuthSession { }) public token: string; - @Column(id()) + @Column({ + ...id(), + nullable: true + }) public userId: User['id']; @ManyToOne(type => User, { - onDelete: 'CASCADE' + onDelete: 'CASCADE', + nullable: true }) @JoinColumn() public user: User | null;