Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
renejeglinsky committed Mar 11, 2024
2 parents da70d96 + 9199259 commit 5b3249a
Show file tree
Hide file tree
Showing 8 changed files with 125 additions and 65 deletions.
4 changes: 2 additions & 2 deletions advanced/odata.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ the import of external service APIs, see [Using Services](../guides/using-servic

```cds
entity Foo {
...,
// ...
@odata: { Type: 'Edm.GeometryPolygon', SRID: 0 }
geoCollection : LargeBinary;
};
Expand All @@ -177,7 +177,7 @@ Therefore, you can override the default mapping as follows:
```cds
entity Books {
key ID : UUID @odata.Type:'Edm.String';
...
// ...
}
```

Expand Down
16 changes: 9 additions & 7 deletions cds/cdl.md
Original file line number Diff line number Diff line change
Expand Up @@ -1565,7 +1565,7 @@ service AdminService {
entity ListOfBooks as projection on my.Books;
entity Books as projection on my.Books;
entity Authors as projection on my.Authors;
//> which one should AdminService.Authors.books refers to?
//> which one should AdminService.Authors.books refer to?
}
```

Expand All @@ -1575,9 +1575,10 @@ You can use `redirected to` to resolve the ambiguity as follows:

```cds
service AdminService {
...
entity Authors as projection on my.Authors { *,
books : redirected to Books //> resolved ambiguity
entity ListOfBooks as projection on my.Books;
entity Books as projection on my.Books;
entity Authors as projection on my.Authors { *, // [!code focus]
books : redirected to Books //> resolved ambiguity // [!code focus]
};
}
```
Expand All @@ -1588,9 +1589,10 @@ Alternatively, you can use the boolean annotation `@cds.redirection.target` with

```cds
service AdminService {
@cds.redirection.target: true
entity ListOfBooks as projection on my.Books;
...
@cds.redirection.target: true // [!code focus]
entity ListOfBooks as projection on my.Books; // [!code focus]
entity Books as projection on my.Books;
entity Authors as projection on my.Authors;
}
```

Expand Down
12 changes: 6 additions & 6 deletions cds/csn.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ For the remainder of this spec, you see examples in plain JavaScript representat
* [`extensions`](#aspects) – an array of unnamed [aspects](#aspects)
* [`i18n`](#i18n) – a dictionary of dictionaries of [text translations](#i18n)
::: tip All properties are optional
For example, one model could contain a few definitions, while another one only contains some extensions.
:::
> [!TIP] All properties are optional
> For example, one model could contain a few definitions, while another one only contains some extensions.
> [!NOTE] References are case-sensitive
> All references in properties like `type` or `target` use exactly the same notation regarding casing as their targets' names. To avoid problems when translating models to case-insensitive environments like SQL databases, avoid case-significant names and references. For example, avoid two different definitions in the same scope whose names only differ in casing, such as `foo` and `Foo`.
::: info References are case-sensitive
All references in properties like `type` or `target` use exactly the same notation regarding casing as their targets' names. To avoid problems when translating models to case-insensitive environments like SQL databases, avoid case-significant names and references. For example, avoid two different definitions in the same scope whose names only differ in casing, such as `foo` and `Foo`.
:::
Expand Down
2 changes: 1 addition & 1 deletion guides/security/aspects.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ and hence has established trust with the CAP application client, for instance gi
Authentication for a CAP sidecar needs to be configured just like any other CAP application.

::: warning
❗ Ensure that technical roles such as `cds.Subscriber`, `mtcallback`, or `emcallback` **never are included in business roles**.
❗ Ensure that technical roles such as `cds.Subscriber`, `mtcallback`, or `emcallback` **are never included in business roles**.
:::

### Platform Users { #platform-authz }
Expand Down
2 changes: 1 addition & 1 deletion java/building-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ The decision between the two is straightforward: In case your handler depends on
If your custom handler is isolated and, for example, only performs a validation based on provided data or a calculation, you can stick with the [CAP Java ServiceLoader approach](#service-loader), which is described in the following section.

### Load Plugin Code via ServiceLoaders {#service-loader}
At runtime, CAP Java uses the [`ServiceLoader`](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/ServiceLoader.html) mechanism to load all implementations of the `CdsRuntimeConfiguration` interface from the application's ClassPath. In order to qualify as a contributor for a given ServiceLoader-enabled interface, we need to place a plain text file, named like the fully qualified name of the interface, in the directory `src/main/resources/META-INF/services` of our reuse model. This file contains the name of one or more implementing classes. For the earlier implemented `CdsRuntimeConfiguration` we need to create a file `src/main/resources/META-INF/services/CdsRuntimeConfiguration` with the following content:
At runtime, CAP Java uses the [`ServiceLoader`](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/ServiceLoader.html) mechanism to load all implementations of the `CdsRuntimeConfiguration` interface from the application's ClassPath. In order to qualify as a contributor for a given ServiceLoader-enabled interface, we need to place a plain text file, named like the fully qualified name of the interface, in the directory `src/main/resources/META-INF/services` of our reuse model. This file contains the name of one or more implementing classes. For the earlier implemented `CdsRuntimeConfiguration` we need to create a file `src/main/resources/META-INF/services/com.sap.cds.services.runtime.CdsRuntimeConfiguration` with the following content:

```txt
com.sap.example.cds.SampleHandlerRuntimeConfiguration
Expand Down
Loading

0 comments on commit 5b3249a

Please sign in to comment.