File tree 1 file changed +1
-1
lines changed
test/JsonApiDotNetCoreExampleTests/IntegrationTests/RequiredRelationships
1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ protected override void OnModelCreating(ModelBuilder builder)
27
27
// By default, EF Core generates an identifying foreign key for a required 1-to-1 relationship.
28
28
// This means no foreign key column is generated, instead the primary keys point to each other directly.
29
29
// That mechanism does not make sense for JSON:API, because patching a relationship would result in
30
- // also changing the identity of a resource. Therefore we need to add an explicit foreign in this case .
30
+ // also changing the identity of a resource. Naming the key explicitly forces to create a foreign key column .
31
31
builder . Entity < Order > ( )
32
32
. HasOne ( order => order . Shipment )
33
33
. WithOne ( shipment => shipment . Order )
You can’t perform that action at this time.
0 commit comments