zmiana mapowania

This commit is contained in:
Kamil Ryżek 2024-06-08 03:34:24 +02:00
parent 812ee1b8eb
commit 5b13f70572
6 changed files with 0 additions and 19 deletions

View File

@ -8,6 +8,5 @@ namespace FirmTracker_Server.nHibernate.Expenses
public virtual DateTime Date { get; set; }
public virtual decimal Value { get; set; }
public virtual string Description { get; set; }
public virtual IList<Report> Reports { get; set; } = new List<Report>();
}
}

View File

@ -12,12 +12,6 @@ namespace FirmTracker_Server.nHibernate.Expenses
Map(x => x.Value);
Map(x => x.Description);
HasManyToMany(x => x.Reports)
.Cascade.All()
.Table("ReportExpenses")
.ParentKeyColumn("ExpenseId")
.ChildKeyColumn("ReportId");
}
}
}

View File

@ -16,7 +16,6 @@ namespace FirmTracker_Server.nHibernate.Transactions
public virtual decimal Discount { get; set; }
public virtual string Description { get; set; }
public virtual decimal TotalPrice { get; set; }//=> TransactionProducts.Sum(tp => ((tp.Quantity * tp.UnitPrice)* ((1 - (Discount / 100)))));// (1 - (Discount / 100)));
public virtual IList<Report> Reports { get; set; } = new List<Report>();
public Transaction()
{

View File

@ -16,7 +16,6 @@ namespace FirmTracker_Server.nHibernate.Transactions
public virtual decimal Discount { get; set; }
public virtual string Description { get; set; }
public virtual decimal TotalPrice { get; set; }//=> TransactionProducts.Sum(tp => ((tp.Quantity * tp.UnitPrice)* ((1 - (Discount / 100)))));// (1 - (Discount / 100)));
public virtual IList<Report> Reports { get; set; } = new List<Report>();
public Transaction2()
{

View File

@ -19,11 +19,6 @@ namespace FirmTracker_Server.nHibernate.Transactions
.Cascade.AllDeleteOrphan()
.Inverse(); // Ustawienie Inverse() wskazuje, że to `TransactionProduct` jest właścicielem relacji
HasManyToMany(x => x.Reports)
.Cascade.All()
.Table("ReportTransactions")
.ParentKeyColumn("TransactionId")
.ChildKeyColumn("ReportId");
}
}
}

View File

@ -19,11 +19,6 @@ namespace FirmTracker_Server.nHibernate.Transactions
.Cascade.AllDeleteOrphan()
.Inverse(); // Ustawienie Inverse() wskazuje, że to `TransactionProduct` jest właścicielem relacji
HasManyToMany(x => x.Reports)
.Cascade.All()
.Table("ReportTransactions")
.ParentKeyColumn("TransactionId")
.ChildKeyColumn("ReportId");
}
}
}