From 81b3fc43a900857443c3c763f52e0a54719c2fae Mon Sep 17 00:00:00 2001 From: transtrike Date: Wed, 3 Feb 2021 02:59:21 +0200 Subject: User-Friends Relation Fixed --- src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs') diff --git a/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs b/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs index 435adb4..96cabad 100644 --- a/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs +++ b/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs @@ -233,7 +233,7 @@ namespace DevHive.Data.Migrations b.ToTable("RatedPosts"); }); - modelBuilder.Entity("DevHive.Data.RelationModels.UserFriends", b => + modelBuilder.Entity("DevHive.Data.RelationModels.UserFriend", b => { b.Property("UserId") .HasColumnType("uuid"); @@ -456,16 +456,16 @@ namespace DevHive.Data.Migrations b.Navigation("User"); }); - modelBuilder.Entity("DevHive.Data.RelationModels.UserFriends", b => + modelBuilder.Entity("DevHive.Data.RelationModels.UserFriend", b => { b.HasOne("DevHive.Data.Models.User", "Friend") - .WithMany() + .WithMany("FriendsOf") .HasForeignKey("FriendId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("DevHive.Data.Models.User", "User") - .WithMany("Friends") + .WithMany("MyFriends") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); @@ -589,7 +589,9 @@ namespace DevHive.Data.Migrations { b.Navigation("Comments"); - b.Navigation("Friends"); + b.Navigation("FriendsOf"); + + b.Navigation("MyFriends"); b.Navigation("Posts"); }); -- cgit v1.2.3