You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/joins.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ This document covers how ActiveForge ORM handles SQL JOINs — both the automati
7
7
## Overview
8
8
9
9
ActiveForge ORM derives JOIN SQL from the **structure of your entity class**, not from a query builder.
10
-
When you embed a `DataObject` field inside another `DataObject`, the ORM automatically emits a JOIN between the two tables when you query the outer type.
10
+
When you embed a `Record` field inside another `Record`, the ORM automatically emits a JOIN between the two tables when you query the outer type.
11
11
12
12
There are three layers of JOIN control:
13
13
@@ -23,7 +23,7 @@ There are three layers of JOIN control:
23
23
24
24
If your entity class has:
25
25
- a `TForeignKey` field named `XID` (e.g. `CategoryID`)
26
-
- a `DataObject` field named `X` (e.g. `Category`) whose class name ends in `X`
26
+
- a `Record` field named `X` (e.g. `Category`) whose class name ends in `X`
1.`conn.Query<T>()` creates an `OrmQueryable<T>` wrapping a template `DataObject` instance.
300
+
1.`conn.Query<T>()` creates an `OrmQueryable<T>` wrapping a template `Record` instance.
301
301
2. Each LINQ operator (`.Where(...)`, `.OrderBy(...)`, etc.) calls `IQueryProvider.CreateQuery()` on `OrmQueryProvider<T>`.
302
302
3.`OrmQueryProvider<T>` recursively walks the expression tree, translating each operator into ORM state (WhereTerm, SortOrder, PageSize, SkipCount).
303
303
4. When you enumerate (`ToList()`, `foreach`, etc.), `OrmQueryable<T>.GetEnumerator()` calls `conn.LazyQueryAll<T>(...)` or `conn.QueryPage(...)` with the accumulated state.
@@ -311,8 +311,8 @@ The expression tree is traversed **at execution time**, so local variables are c
311
311
| Limitation | Notes |
312
312
|------------|-------|
313
313
| No `GroupBy`| Not supported; use raw SQL or `ExecSQL`. |
314
-
| No `Join` clause | Cross-join predicates and sorts work via embedded `DataObject` fields. See [joins.md](joins.md). |
315
-
| No `Select` projection | Returns full typed `DataObject` instances; field subsets can be applied at the `conn.Query<T>(template)` level. |
314
+
| No `Join` clause | Cross-join predicates and sorts work via embedded `Record` fields. See [joins.md](joins.md). |
315
+
| No `Select` projection | Returns full typed `Record` instances; field subsets can be applied at the `conn.Query<T>(template)` level. |
316
316
| No `Count()`, `First()`, etc. | Call the standard ORM methods (`conn.QueryCount(...)`, `conn.QueryFirst(...)`) directly. |
317
317
| No async support | Use the synchronous API; async is planned for a future release. |
0 commit comments