Skip to content

Commit 324fde3

Browse files
2881028810
authored andcommitted
- 增加 GlobalFilter.ApplyOnly 继承的实体才生效;#495
1 parent 3fe4b44 commit 324fde3

File tree

41 files changed

+588
-720
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+588
-720
lines changed

FreeSql.Tests/FreeSql.Tests/UnitTest2.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,22 @@ public class otot2
244244
public int id { get; set; }
245245
public string title { get; set; }
246246
}
247+
public class otot3 : otot1
248+
{
249+
250+
}
247251

248252
[Fact]
249253
public void Test02()
250254
{
255+
g.sqlite.GlobalFilter
256+
.ApplyOnly<otot1>("id1", a => a.name == "123");
257+
258+
var sqlonly = g.sqlite.Select<otot1, otot2, otot3>()
259+
.InnerJoin((a, b, c) => a.id == b.id)
260+
.InnerJoin((a, b, c) => b.id == c.id)
261+
.ToSql();
262+
251263
g.sqlite.Update<TestIgnoreDefaultValue>(Guid.Empty).Set(a => a.ct1 == a.ct2).ExecuteAffrows();
252264

253265
g.sqlite.Insert(new otot1 { name = "otot1_name1" }).ExecuteAffrows();

FreeSql/FreeSql.xml

Lines changed: 24 additions & 189 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)