From 7fc10c782b1111685e89e5366d57d3aa770fbeb7 Mon Sep 17 00:00:00 2001 From: hjboth <124381150+hjboth@users.noreply.github.com> Date: Fri, 7 Jun 2024 15:27:05 +0200 Subject: [PATCH 1/3] Mention that draft decorations can't be used in annotation expressions Sth like `(IsActiveEntity = false)` doesn't work. --- cds/cdl.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cds/cdl.md b/cds/cdl.md index ce0a2a2bc..c050e3434 100644 --- a/cds/cdl.md +++ b/cds/cdl.md @@ -1093,6 +1093,10 @@ Some advantages of using expressions as "first class" annotation values are: * [automatic path rewriting in propagated annotations](#propagation) * [automatic translation of expressions in OData annotations](#odata-annotations) +::: Limitations +Elements that are not available to the compiler such as the OData draft decoration for example can't be used in annotation expressions. +::: + #### Name resolution Each path in the expression is checked: From 2ad3b5933a6e936b770fa51ff65d1ce40d776192 Mon Sep 17 00:00:00 2001 From: hjboth <124381150+hjboth@users.noreply.github.com> Date: Mon, 10 Jun 2024 15:31:03 +0200 Subject: [PATCH 2/3] Update cds/cdl.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- cds/cdl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cds/cdl.md b/cds/cdl.md index c050e3434..47bc76a24 100644 --- a/cds/cdl.md +++ b/cds/cdl.md @@ -1093,7 +1093,7 @@ Some advantages of using expressions as "first class" annotation values are: * [automatic path rewriting in propagated annotations](#propagation) * [automatic translation of expressions in OData annotations](#odata-annotations) -::: Limitations +::: info Limitations Elements that are not available to the compiler such as the OData draft decoration for example can't be used in annotation expressions. ::: From 21428c2e9957c6a9b15f764c99a68951f807579d Mon Sep 17 00:00:00 2001 From: hjboth <124381150+hjboth@users.noreply.github.com> Date: Mon, 10 Jun 2024 17:19:28 +0200 Subject: [PATCH 3/3] Update cds/cdl.md Co-authored-by: Steffen Weinstock <79531202+stewsk@users.noreply.github.com> --- cds/cdl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cds/cdl.md b/cds/cdl.md index 47bc76a24..f2cde0a8f 100644 --- a/cds/cdl.md +++ b/cds/cdl.md @@ -1094,7 +1094,7 @@ Some advantages of using expressions as "first class" annotation values are: * [automatic translation of expressions in OData annotations](#odata-annotations) ::: info Limitations -Elements that are not available to the compiler such as the OData draft decoration for example can't be used in annotation expressions. +Elements that are not available to the compiler, for example the OData draft decoration, can't be used in annotation expressions. ::: #### Name resolution