Skip to content

Commit 95d9330

Browse files
stewskbugwellerenejeglinsky
authored
(cds 9) No native HANA associations (#1827)
Co-authored-by: Andre Meyering <[email protected]> Co-authored-by: Rene Jeglinsky <[email protected]>
1 parent 24ae3e8 commit 95d9330

File tree

1 file changed

+11
-36
lines changed

1 file changed

+11
-36
lines changed

guides/databases-hana.md

Lines changed: 11 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -659,48 +659,23 @@ All limitations for the SAP HANA Cloud database can be found in the [SAP Help Po
659659

660660
### Native Associations
661661

662-
For SAP HANA, CDS associations are by default reflected in the respective database tables and views
663-
by _Native HANA Associations_ (HANA SQL clause `WITH ASSOCIATIONS`).
664-
665-
CAP no longer needs these native associations (provided you use the new database
666-
service _@cap-js/hana_ for the CAP Node.js stack).
667-
668-
Unless you explicitly use them in other native HANA objects, we recommend
669-
switching off the generation of native HANA associations, as they increase deploy times:
662+
In previous CAP releases, CDS associations were by default reflected in SAP HANA
663+
database tables and views by _Native HANA Associations_ (HANA SQL clause `WITH ASSOCIATIONS`).
664+
But the presence of such native associations significantly increases (re-)deploy times:
670665
They need to be validated in the HDI deployment, and they can introduce
671666
indirect dependencies between other objects, which can trigger other unnecessary revalidations
672-
or even unnecessary drop/create of indexes. By switching them off, all this effort is saved.
667+
or even unnecessary drop/create of indexes.
673668

674-
::: code-group
669+
As CAP doesn't need these native associations, by default no native HANA associations
670+
are created anymore starting with CAP 9.
675671

676-
```json [package.json]
677-
{
678-
"cds": {
679-
"sql": {
680-
"native_hana_associations": false
681-
}
682-
}
683-
}
684-
```
685-
686-
```json [cdsrc.json]
687-
{
688-
"sql": {
689-
"native_hana_associations": false
690-
}
691-
}
692-
```
693-
694-
:::
695-
696-
697-
For new projects, `cds add hana` automatically adds this configuration.
672+
In the unlikely case that you need native HANA associations because you explicitly use them
673+
in other native HANA objects or in custom code, you can switch them back on with <Config>cds.sql.native_hana_associations = true</Config>.
698674

699675
::: warning Initial full table migration
700-
Be aware, that the first deployment after this **configuration change may take longer**.
676+
Be aware that the first deployment after this **configuration change may take longer**.
701677

702-
For each entity with associations, the respective database object will be touched
678+
For each entity with associations, the respective database object is touched
703679
(DROP/CREATE for views, full table migration via shadow table and data copy for tables).
704-
This is also the reason why we haven't changed the default so far.
705-
Subsequent deployments will benefit, however.
680+
706681
:::

0 commit comments

Comments
 (0)