Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
SCullman authored Jul 13, 2020
1 parent d0cc6a9 commit 872e8fd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,9 @@ Therfore we can query $metadata and check the entity type:
```
### Association

No navigation properties yet. Well, as the custom API is independent of the OData web service, it is required to define also an API for Contact:
No navigation properties yet.

Well, as the custom API is independent of the OData web service, it is required to define also an API for Contact:

``` al
page 50103 "Contact API"
Expand Down Expand Up @@ -735,7 +737,7 @@ But the `$metadata` changed. The more or less meaningless navigation property `c
</EntityType>
```

The cardinality still does not fit, there can only be one company contact linked to a contact.
The cardinality does not fit anymore; as there can only be one company contact linked to a contact. But in fact, that is comparable to me with the OData web services.

But now I can query for `contacts('KT200038')?$expand=companyContacts($expand=contact)`:
```json
Expand Down Expand Up @@ -770,4 +772,4 @@ I appreciate the clean separation of APIs from other APIs or even the UI. They c

Also, a simple association no longer results in a collection. I also like that both required AL code and resulting $metadata are now denser.

You have to think differently about your queries. It is best to design any relation explicitly as own page and refer it as part, at least from a perspective of querying data.
You have to think differently about your queries. It is best to design any relation explicitly as own page and refer it as part, at least from a perspective of querying data.

0 comments on commit 872e8fd

Please sign in to comment.