- 增加 变异的 IncludeMany,即使不是导航属性,也可以贪婪加载;

This commit is contained in:
28810
2019-05-14 18:07:27 +08:00
parent 7238f6797b
commit defaa224fb
6 changed files with 96 additions and 11 deletions

View File

@@ -96,6 +96,9 @@ namespace FreeSql.Tests {
public int M2Id { get; set; }
[Column(IsIgnore = true)]
public List<Model1> TestManys { get; set; }
}
public class Model2 {
@@ -133,11 +136,28 @@ namespace FreeSql.Tests {
var includet1 = g.sqlite.Select<Model1>()
.IncludeMany(a => a.Childs, s => s.Where(a => a.id > 0))
.IncludeMany(a => a.TestManys.Where(b => b.id == a.id))
.Where(a => a.id > 10)
.ToList();
var ttt1 = g.sqlite.Select<Model1>().Where(a => a.Childs.AsSelect().Any(b => b.title == "111")).ToList();