You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,10 +28,12 @@ export class AdvertRepository extends AbstractPolymorphicRepository<
28
28
> {}
29
29
```
30
30
31
-
> The below decorators will only work when using the above extended PolymorphicRepository
31
+
> The below decorators will only work when using the above abstract repository AbstractPolymorphicRepository
32
32
33
33
### Setup the entities
34
34
35
+
This is an example of one child, 2 parent types
36
+
35
37
#### Parents
36
38
37
39
```ts
@@ -80,6 +82,7 @@ export class AdvertEntity implements PolymorphicChildInterface {
80
82
This will result in the adverts table having values
81
83
82
84
```
85
+
adverts table
83
86
==========================
84
87
id | entityId | entityType
85
88
==========================
@@ -90,7 +93,7 @@ id | entityId | entityType
90
93
91
94
## Decorators
92
95
93
-
Both `PolymorphicChildren` and `PolymophicParent` are the same. Currently some of the default values are different but eventually these method should be synonyms of one another. Mainly because it helped me describe the relationship directions.
96
+
Both `PolymorphicChildren` and `PolymophicParent` are treated same. Currently some of the default values are different but eventually these method should be synonyms of one another. They have different names because it helped me describe the relationship directions which could be explained as 'parent' 'child' in different ways.
0 commit comments