mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 10:42:52 +08:00
- 优化 ManyToMany 中间表不需要指明 [Column(IsPrimary = true)] 特性;
This commit is contained in:
parent
9f7d8cbdc9
commit
6c1d532d09
@ -547,7 +547,9 @@ namespace FreeSql.Internal
|
|||||||
nvref.MiddleColumns.AddRange(trytbTf.Columns);
|
nvref.MiddleColumns.AddRange(trytbTf.Columns);
|
||||||
|
|
||||||
if (tbmid.Primarys.Any() == false)
|
if (tbmid.Primarys.Any() == false)
|
||||||
trytbTf.Columns.Select(c => tbmid.ColumnsByCs[c.CsName].Attribute.IsPrimary = true);
|
foreach (var c in trytbTf.Columns)
|
||||||
|
tbmid.ColumnsByCs[c.CsName].Attribute.IsPrimary = true;
|
||||||
|
|
||||||
if (isLazy)
|
if (isLazy)
|
||||||
{
|
{
|
||||||
for (var a = 0; a < trytbTf.RefColumns.Count; a++)
|
for (var a = 0; a < trytbTf.RefColumns.Count; a++)
|
||||||
@ -592,7 +594,8 @@ namespace FreeSql.Internal
|
|||||||
nvref.MiddleColumns.AddRange(tbrefTf.Columns);
|
nvref.MiddleColumns.AddRange(tbrefTf.Columns);
|
||||||
|
|
||||||
if (tbmid.Primarys.Any() == false)
|
if (tbmid.Primarys.Any() == false)
|
||||||
tbrefTf.Columns.Select(c => tbmid.ColumnsByCs[c.CsName].Attribute.IsPrimary = true);
|
foreach (var c in tbrefTf.Columns)
|
||||||
|
tbmid.ColumnsByCs[c.CsName].Attribute.IsPrimary = true;
|
||||||
|
|
||||||
if (isLazy)
|
if (isLazy)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user