Bladeren bron

Fix db primary key

ghorsington 5 jaren geleden
bovenliggende
commit
1b0f54ef23
1 gewijzigde bestanden met toevoegingen van 1 en 2 verwijderingen
  1. 1 2
      db/src/entity/ContestVote.ts

+ 1 - 2
db/src/entity/ContestVote.ts

@@ -9,8 +9,7 @@ export class ContestVote {
     userId: string;
 
     // :thonq
-    @PrimaryColumn()
-    @ManyToOne(type => Contest, contest => contest.votes)
+    @ManyToOne(type => Contest, contest => contest.votes, { primary: true })
     contest: Contest;
 
     @ManyToOne(type => ContestEntry, entry => entry.votes)