Skip to content

Commit

Permalink
Merge branch 'main' into composition-of-one-limitations
Browse files Browse the repository at this point in the history
  • Loading branch information
etimr authored Mar 11, 2024
2 parents 27de529 + 57552fe commit 49cf4f9
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions cds/cdl.md
Original file line number Diff line number Diff line change
Expand Up @@ -1545,6 +1545,29 @@ GET: /OrderWithParameter(foo=5)/Set or GET: /OrderWithParameter(5)/Set
GET: /ViewInService(p1=5, p2=true)/Set
```

To expose an entity, it's not necessary to be lexically enclosed in the service definition. An entity's affiliation to a service is established using its fully qualified name, so you can also use one of the following options:

- Add a namespace.
- Use the service name as prefix.

In the following example, all entities belong to/are exposed by the same service:

::: code-group
```cds [myservice.cds]
service foo.MyService {
entity A { /*...*/ };
}
entity foo.MyService.B { /*...*/ };
```
:::

::: code-group
```cds [another.cds]
namespace foo.MyService;
entity C { /*...*/ };
```
:::


### (Auto-) Redirected Associations {#auto-redirect}

Expand Down Expand Up @@ -1776,6 +1799,7 @@ entity Bar : Foo {} //> foo.bar.Bar
```
:::

A namespace is not an object of its own. There is no corresponding definition in CSN.

### The `context` Directive {#context}

Expand Down

0 comments on commit 49cf4f9

Please sign in to comment.