0% found this document useful (0 votes)
179 views6 pages

Common Annotation in CDS

This document provides a reference and glossary of common annotations supported by the CDS compiler and runtimes. It lists annotations for general purpose, access control, input validation, services/APIs, persistence, OData, and capabilities. For each annotation, a brief description and related alternatives are given.

Uploaded by

krajiv6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
179 views6 pages

Common Annotation in CDS

This document provides a reference and glossary of common annotations supported by the CDS compiler and runtimes. It lists annotations for general purpose, access control, input validation, services/APIs, persistence, OData, and capabilities. For each annotation, a brief description and related alternatives are given.

Uploaded by

krajiv6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Common Annotations

Find here a reference and glossary of common annotations intrinsically supported by the CDS
compiler and runtimes.

General Purpose

Annotation Description Alternatives

@title Common.Label

Core.Descriptio
@description
n

Access Control

Annotatio
Description
n

@readonly see Input Validation

@insertonly see Generic Handlers

@restrict see Authorization
Annotatio
Description
n

@requires see Authorization

Input Validation

Annotation Description

@readonly see Input Validation

@mandatory see Input Validation

@assert.unique see Input Validation

@assert.integrity see Input Validation

@assert.target see Input Validation

@assert.format see Input Validation

@assert.range see Input Validation

@assert.notNull see Input Validation


Annotation Description

Services / APIs

Annotation Description

@path see Services

@impl see Reuse & Compose

@odata.etag see Providing Services

@cds.autoexpose see Providing Services

@cds.api.ignore see OData

@cds.query.limit see Providing Services

@cds.localized see Localized Data

@cds.valid.from/to see Temporal Data


Annotation Description

@cds.search see Search Capabilities

Persistence

Annotation Description

@cds.persistence.exist
s
tells compile.to.sql this is created otherwise

@cds.persistence.table tells compile.to.sql to create a table, not a view

@cds.persistence.skip tells the compiler, this entity shall not exist in database at all

@cds.persistence.mock false excludes this entity from automatic mocking

@cds.on.insert see Providing Services

@cds.on.update see Providing Services

OData
Learn more about OData Annotations in CDS.

Shortcuts:

Annotation Description

@ValueList.entity see Domain Modeling

@odata.Type see OData

@odata.MaxLength see OData

@odata.Precision see OData

@odata.Scale see OData

@odata.singleton see OData

Intrinsically supported OData Annotations:

Annotation Description

@Core.Computed see Providing Services

@Core.Immutable see Providing Services

@Core.MediaType see Media Data


Annotation Description

@Core.IsMediaTyp
e
see Media Data

@Core.IsUrl see Media Data

@Capabilities... see Fiori

You might also like