Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# This files defines code ownership.

# General content
* @renejeglinsky
node.js/ @smahati
java/ @smahati
* @smahati
# node.js/ @smahati
# java/ @smahati

# Infra
.github/ @chgeo @swaldmann
Expand Down
4 changes: 2 additions & 2 deletions advanced/fiori.md
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,10 @@ SELECT.from(Books.drafts) //returns all drafts of the Books entity

In addition to adding [restrictions on services, entities, and actions/functions](/guides/security/authorization#restrictions), there are use cases where you only want to hide certain parts of the UI for specific users. This is possible by using the respective UI annotations like `@UI.Hidden` or `@UI.CreateHidden` in conjunction with `$edmJson` pointing to a singleton.

First, you define the [singleton](../advanced/odata#singletons) in your service and annotate it with [`@cds.persistency.skip`](../guides/databases#cds-persistence-skip) so that no database artefact is created:
First, you define the [singleton](../advanced/odata#singletons) in your service and annotate it with [`@cds.persistence.skip`](../guides/databases#cds-persistence-skip) so that no database artefact is created:

```cds
@odata.singleton @cds.persistency.skip
@odata.singleton @cds.persistence.skip
entity Configuration {
key ID: String;
isAdmin : Boolean;
Expand Down
2 changes: 1 addition & 1 deletion cds/cdl.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ cds.compile(..., { docs: true })

::: tip Doc comments are automatically enabled in CAP Java.
In CAP Java, doc comments are automatically enabled by the [CDS Maven Plugin](../java/developing-applications/building#cds-maven-plugin).
In generated interfaces they are [converted to corresponding Javadoc comments](../java/assets/cds-maven-plugin-site/generate-mojo.html#documentation).
In generated interfaces they are [converted to corresponding Javadoc comments](../java/assets/cds-maven-plugin-site/generate-mojo.html#documentation){target="_blank"}.
:::

When generating output for deployment to SAP HANA, the first paragraph of a doc comment is translated
Expand Down
4 changes: 2 additions & 2 deletions guides/databases-postgres.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ cds build --production
```json
{
"dependencies": {
"@sap/cds": "^8",
"@cap-js/postgres": "^1"
"@sap/cds": "^9",
"@cap-js/postgres": "^2"
},
"scripts": {
"start": "cds-deploy"
Expand Down
2 changes: 1 addition & 1 deletion guides/deployment/custom-builds.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ In the application's _package.json_, add a dependency to your plugin package to

```jsonc [package.json]
"dependencies": {
"@cap-js/postgres": "^1"
"@cap-js/postgres": "^2"
}
```

Expand Down
4 changes: 2 additions & 2 deletions guides/extensibility/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ npm add @sap/cds-mtxs
"version": "1.0.0",
"dependencies": {
"@capire/common": "*",
"@sap/cds": ">=5",
"@sap/cds-mtxs": "^1"
"@sap/cds": ">=9",
"@sap/cds-mtxs": "^3"
},
"cds": {
"requires": {
Expand Down
19 changes: 11 additions & 8 deletions guides/multitenancy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ cds add multitenancy
```jsonc
{
"dependencies": {
"@sap/cds-mtxs": "^2"
"@sap/cds-mtxs": "^3"
},
}
```
Expand All @@ -92,13 +92,16 @@ cds add multitenancy
"name": "bookshop-mtx",
"dependencies": {
"@cap-js/hana": "^2",
"@sap/cds": "^8",
"@sap/cds-mtxs": "^2",
"@sap/cds": "^9",
"@sap/cds-mtxs": "^3",
"@sap/xssec": "^4",
"express": "^4"
},
"devDependencies": {
"@cap-js/sqlite": "^1"
"@cap-js/sqlite": "^2"
},
"engines": {
"node": ">=20"
},
"scripts": {
"start": "cds-serve"
Expand Down Expand Up @@ -164,13 +167,13 @@ cds add multitenancy
"name": "bookshop-mtx",
"dependencies": {
"@cap-js/hana": "^2",
"@sap/cds": "^8",
"@sap/cds-mtxs": "^2",
"@sap/cds": "^9",
"@sap/cds-mtxs": "^3",
"@sap/xssec": "^4",
"express": "^4"
},
"devDependencies": {
"@cap-js/sqlite": "^1"
"@cap-js/sqlite": "^2"
},
"scripts": {
"start": "cds-serve",
Expand Down Expand Up @@ -376,7 +379,7 @@ In the following steps, we start two servers, the main app and MTX sidecar, and
In addition, we can see a `t0` tenant being deployed, which is used by the MTX services for book-keeping tasks.

```log
[cds|t0] - loaded model from 1 file(s):
[cds] - loaded model from 1 file(s):

../../db/t0.cds

Expand Down
2 changes: 1 addition & 1 deletion java/cds-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ Following is an example of the fluent style:
Books.create().author(author).title("Wuthering Heights");
```

The generation mode is configured by the property [`<methodStyle>`](./assets/cds-maven-plugin-site/generate-mojo.html#methodstyle) of the goal `cds:generate` provided by the CDS Maven Plugin. The selected `<methodStyle>` affects all entities and event contexts in your services. The default value is `BEAN`, which represents JavaBeans-style interfaces.
The generation mode is configured by the property [`<methodStyle>`](./assets/cds-maven-plugin-site/generate-mojo.html#methodstyle){target="_blank"} of the goal `cds:generate` provided by the CDS Maven Plugin. The selected `<methodStyle>` affects all entities and event contexts in your services. The default value is `BEAN`, which represents JavaBeans-style interfaces.

Once, when starting a project, decide on the style of the interfaces that is best for your team and project. We recommend the default JavaBeans style.

Expand Down
2 changes: 1 addition & 1 deletion node.js/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Example:

```json
"dependencies": {
"@sap/cds": "^5.5.0",
"@sap/cds": "^9.1.0",
"@sap/some-reuse-package": "^1.1.0",
"express": "^4.17.0"
}
Expand Down
53 changes: 28 additions & 25 deletions node.js/fiori.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,35 @@ You can set the property to one of the following:
- number of minutes like `'10min'`
- number of milliseconds like `1000`

### Bypassing the SAP Fiori Draft Flow
:::tip Delete released draft locks
If the `draft_lock_timeout` has been reached, every user can delete other users' drafts to create an own draft. There can't be two drafts at the same time on the same entity.
:::

### Garbage Collection of Stale Drafts

Inactive drafts are deleted automatically after the default timeout of 30 days. You can configure or deactivate this timeout by the following configuration:

```json
{
"cds": {
"fiori": {
"draft_deletion_timeout": "28d"
}
}
}
```

You can set the property to one of the following:
- `false` in order to deactivate the timeout
- number of days like `'30d'`
- number of hours like `'72h'`
- number of milliseconds like `1000`

::: info Technical background
It can occur that inactive drafts are still in the database after the configured timeout. The deletion is implemented as a side effect of creating new drafts and there's no periodic job that does the garbage collection.
:::

### Bypassing the SAP Fiori Draft Flow
Creating or modifying active instances directly is possible without creating drafts. This comes in handy when technical services without a UI interact with each other.

To enable this feature, set this feature flag in your configuration:
Expand Down Expand Up @@ -122,30 +149,6 @@ Note that this feature creates additional entry points to your application. Cust
payloads rather than the complete business object.
:::

### Garbage Collection of Stale Drafts

Inactive drafts are deleted automatically after the default timeout of 30 days. You can configure or deactivate this timeout by the following configuration:

```json
{
"cds": {
"fiori": {
"draft_deletion_timeout": "28d"
}
}
}
```

You can set the property to one of the following:
- `false` in order to deactivate the timeout
- number of days like `'30d'`
- number of hours like `'72h'`
- number of milliseconds like `1000`

::: info Technical background
It can occur that inactive drafts are still in the database after the configured timeout. The deletion is implemented as a side effect of creating new drafts and there's no periodic job that does the garbage collection.
:::

### Differences to Previous Version

- Draft-enabled entities have corresponding CSN entities for drafts:
Expand Down
Loading