- 修复 复杂的表达式解析 OR 的括号 bug;

This commit is contained in:
28810
2019-05-08 16:12:33 +08:00
parent 4c1dec64d4
commit 8f1bce0574
8 changed files with 44 additions and 12 deletions

View File

@ -86,8 +86,35 @@ namespace FreeSql.Tests {
public abstract Task Persistent();
}
public class Model1 {
[Column(IsIdentity = true)]
public int id { get; set; }
public string title { get; set; }
public ICollection<Model2> Childs { get; set; }
}
public class Model2 {
[Column(IsIdentity = true)]
public int id { get; set; }
public string title { get; set; }
public Model1 Parent { get; set; }
public int parent_id { get; set; }
}
[Fact]
public void Test1() {
var ttt1 = g.sqlite.Select<Model1>().Where(a => a.Childs.AsSelect().Any(b => b.title == "111")).ToList();
var linqto1 =
from p in g.sqlite.Select<Order>()
where p.Id >= 0