Common Annotations
Find here a reference and glossary of common annotations intrinsically supported by the CDS compiler and runtimes.
Learn more about the syntax of annotations.
General Purpose
Annotation | Description | Alternatives |
---|---|---|
@title | Common.Label | |
@description | Core.Description |
Access Control
Annotation | Description |
---|---|
@readonly | see Input Validation |
@insertonly | see Generic Handlers |
@restrict | see Authorization |
@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 |
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 |
@cds.search | see Search Capabilities |
Persistence
Annotation | Description |
---|---|
@cds.persistence.exists | see Generating DDL Files |
@cds.persistence.table | see Generating DDL Files |
@cds.persistence.skip | see Generating DDL Files |
@cds.persistence.mock | false excludes this entity from automatic mocking |
@cds.on.insert | see Providing Services |
@cds.on.update | see Providing Services |
@sql.prepend | see Generating DDL Files |
@sql.append | see Generating DDL Files |
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 |
@Core.IsMediaType | see Media Data |
@Core.IsUrl | see Media Data |
@Capabilities... | see Fiori |
@Common.FieldControl | see Input Validation) |