Skip to content

Commit 2a0091f

Browse files
authored
Update collections.md
1 parent dd9fd4e commit 2a0091f

File tree

1 file changed

+64
-1
lines changed

1 file changed

+64
-1
lines changed

graph/articles/collections.md

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ The model can be updated to have two collections side-by-side:
350350
</Key>
351351
<Property Name="id" Type="Edm.String" Nullable="false" />
352352
<Property Name="bars" Type="Collection(self.bar)" />
353-
+ <Property Name="barsAsEntities" Type="Collection(self.barAsEntity)" />
353+
+ <NavigationProperty Name="barsAsEntities" Type="Collection(self.barAsEntity)" ContainsTarget="true" />
354354
</EntityType>
355355

356356
<ComplexType Name="bar">
@@ -410,6 +410,69 @@ TODO implement this in WebApi
410410

411411
### 11.2 `$select` overloading
412412

413+
The model can be updated to simply switch the complex type for an entity type:
414+
```diff
415+
<EntityType Name="foo">
416+
<Key>
417+
<PropertyRef Name="id" />
418+
</Key>
419+
<Property Name="id" Type="Edm.String" Nullable="false" />
420+
- <Property Name="bars" Type="Collection(self.bar)" />
421+
+ <NavigationProperty Name="bars" Type="Collection(self.bar)" ContainsTarget="true" />
422+
</EntityType>
423+
424+
- <ComplexType Name="bar">
425+
+ <EntityType Name="bar">
426+
+ <Key>
427+
+ <PropertyRef Name="prop1" />
428+
+ </Key>
429+
<Property Name="prop1" Type="Edm.String" />
430+
<Property Name="prop2" Type="Edm.String" />
431+
-</ComplexType>
432+
+</EntityType>
433+
```
434+
435+
436+
437+
438+
439+
440+
441+
442+
443+
444+
445+
446+
447+
448+
449+
450+
451+
452+
453+
454+
455+
456+
457+
458+
459+
460+
461+
462+
463+
464+
465+
466+
467+
468+
469+
470+
471+
472+
473+
474+
475+
413476

414477

415478

0 commit comments

Comments
 (0)