mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Fix one to one relationship between company and document company.
This commit is contained in:
@@ -388,9 +388,6 @@ namespace Cicm.Database.Models
|
||||
entity.HasIndex(e => e.Name);
|
||||
|
||||
entity.HasIndex(e => e.CompanyId).IsUnique();
|
||||
|
||||
entity.HasOne(d => d.Company).WithOne(p => p.DocumentCompany)
|
||||
.HasForeignKey<Company>(d => d.DocumentCompanyId).OnDelete(DeleteBehavior.SetNull);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<DocumentPerson>(entity =>
|
||||
|
||||
Reference in New Issue
Block a user