Skip to content

Latest commit

 

History

History
50 lines (38 loc) · 1.3 KB

no-join-on-draft.md

File metadata and controls

50 lines (38 loc) · 1.3 KB
outline breadcrumbs status
2
2
CDS Lint - Rules Reference
released
<script setup> import PlaygroundBadge from '../components/PlaygroundBadge.vue' </script>

no-join-on-draft

Rule Details

Draft-enabled entities shall not be used in views that make use of JOIN. This rule will report a warning for any violations.

Examples

✅   Correct example

In the following example, no draft-enabled entities are used in the service CatalogService:

::: code-group <<< ../examples/no-join-on-draft/correct/srv/cat-service.cds#snippet{cds:line-numbers} [srv/cat-service.cds] :::

❌   Incorrect example

In the next example, the service CatalogService uses a draft-enabled entity and makes use of JOIN, which violates the rule:

::: code-group <<< ../examples/no-join-on-draft/incorrect/srv/cat-service.cds#snippet{cds:line-numbers} [srv/cat-service.cds] :::

Version

This rule was introduced in @sap/eslint-plugin-cds 2.2.1.