Skip to content

Commit dbc2cb2

Browse files
committed
- 调整 ManyToMany 不一定非要双边设置;
1 parent c903c3e commit dbc2cb2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

FreeSql/Internal/UtilsExpressionTree.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -919,10 +919,11 @@ void LocalLazyLoadingCode(string lmbdWhere)
919919

920920
if (pnvAttr?.ManyToMany != null)
921921
{
922-
isManyToMany = propElementType != trytb.Type &&
923-
tbref.Properties.Where(z => (z.Value.PropertyType.GetGenericArguments().FirstOrDefault() == trytb.Type || z.Value.PropertyType.GetElementType() == trytb.Type) &&
924-
common.GetEntityNavigateAttribute(tbref.Type, z.Value)?.ManyToMany == pnvAttr.ManyToMany &&
925-
typeof(IEnumerable).IsAssignableFrom(z.Value.PropertyType)).Any();
922+
isManyToMany = propElementType != trytb.Type
923+
// && tbref.Properties.Where(z => (z.Value.PropertyType.GetGenericArguments().FirstOrDefault() == trytb.Type || z.Value.PropertyType.GetElementType() == trytb.Type) &&
924+
// common.GetEntityNavigateAttribute(tbref.Type, z.Value)?.ManyToMany == pnvAttr.ManyToMany &&
925+
// typeof(IEnumerable).IsAssignableFrom(z.Value.PropertyType)).Any()
926+
;
926927

927928
if (isManyToMany == false)
928929
{

0 commit comments

Comments
 (0)