mirror of
https://github.com/dotnetcore/FreeSql.git
synced 2026-02-07 00:40:55 +08:00
- 调整 ManyToMany 不一定非要双边设置;
This commit is contained in:
@@ -919,10 +919,11 @@ namespace FreeSql.Internal
|
||||
|
||||
if (pnvAttr?.ManyToMany != null)
|
||||
{
|
||||
isManyToMany = propElementType != trytb.Type &&
|
||||
tbref.Properties.Where(z => (z.Value.PropertyType.GetGenericArguments().FirstOrDefault() == trytb.Type || z.Value.PropertyType.GetElementType() == trytb.Type) &&
|
||||
common.GetEntityNavigateAttribute(tbref.Type, z.Value)?.ManyToMany == pnvAttr.ManyToMany &&
|
||||
typeof(IEnumerable).IsAssignableFrom(z.Value.PropertyType)).Any();
|
||||
isManyToMany = propElementType != trytb.Type
|
||||
// && tbref.Properties.Where(z => (z.Value.PropertyType.GetGenericArguments().FirstOrDefault() == trytb.Type || z.Value.PropertyType.GetElementType() == trytb.Type) &&
|
||||
// common.GetEntityNavigateAttribute(tbref.Type, z.Value)?.ManyToMany == pnvAttr.ManyToMany &&
|
||||
// typeof(IEnumerable).IsAssignableFrom(z.Value.PropertyType)).Any()
|
||||
;
|
||||
|
||||
if (isManyToMany == false)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user