Skip to content

Commit 6961cdc

Browse files
committed
Tweak work-antonym relationship
1 parent 7dfff7c commit 6961cdc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/SIL.Harmony.Sample/CrdtSampleKernel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ public static IServiceCollection AddCrdtDataSample(this IServiceCollection servi
6161
.WithMany()
6262
.UsingEntity<WordTag>();
6363
builder.HasOne((w) => w.Antonym)
64-
.WithOne()
65-
.HasForeignKey<Word>(w => w.AntonymId)
64+
.WithMany()
65+
.HasForeignKey(w => w.AntonymId)
6666
.OnDelete(DeleteBehavior.SetNull);
6767
})
6868
.Add<Definition>(builder =>

src/SIL.Harmony.Tests/DbContextTests.VerifyModel.verified.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,10 @@
202202
Keys:
203203
Id PK
204204
Foreign keys:
205-
Word {'AntonymId'} -> Word {'Id'} Unique SetNull ToPrincipal: Antonym
205+
Word {'AntonymId'} -> Word {'Id'} SetNull ToPrincipal: Antonym
206206
Word {'SnapshotId'} -> ObjectSnapshot {'Id'} Unique SetNull
207207
Indexes:
208-
AntonymId Unique
208+
AntonymId
209209
SnapshotId Unique
210210
Annotations:
211211
DiscriminatorProperty:

0 commit comments

Comments
 (0)