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: java/working-with-cql/query-api.md
+3-40Lines changed: 3 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1324,12 +1324,7 @@ StructuredTypeRef ref = bookWithId.asRef(); // or CqnStructuredTypeRef which is
1324
1324
1325
1325
The method `asRef()` seals the reference and makes it immutable.
1326
1326
1327
-
Relative references point to the elements of the entity, for example, the title of a book, where the type is known in advance or specified elsewhere. In CQL statements, relative references are members of its select list and relate to the statement source that is an absolute reference.
1328
-
1329
-
```java
1330
-
CqnElementRef title =CQL.entity(Books_.class).title(); // {"ref":["title"]}
Relative references do not specify the type in the first segment and are [element references](/java/working-with-cql/query-api#element-refs) most of the time.
1333
1328
1334
1329
New references are constructed with [model interfaces](../cqn-services/persistence-services#model-interfaces) or via API that is also used to build [CQL statements](/java/working-with-cql/query-api#concepts). Prefer model interfaces in the application code.
1335
1330
@@ -1339,33 +1334,6 @@ References with multiple segments represent navigation within a structured entit
@@ -1435,17 +1403,12 @@ The references are not comparable between each other. They cannot be used as map
1435
1403
1436
1404
### Element References {#element-refs}
1437
1405
1438
-
An element reference points to an element of the entity. Such references are usually _relative_, they do not have the name of the entity in their root. They can include filters in their segments except _in the last one_.
1439
-
Most of the time, they exist as members of the [select list](#projections) of a statement or part of the statement, for example, of an expand predicate.
1440
-
1441
-
The following example illustrates the difference:
1406
+
An element reference points to regular element of the entity. Such references are usually _relative_ and form select list for a CQL statement or an expand.
1442
1407
1443
1408
```java
1444
1409
CqnSelect statement =Select.from(Books_.class, b -> b.filter(f ->f.ID().eq("...")))
0 commit comments