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
Introduced [MapToParent] functionality to TopicMappingService
The `[MapToParent]` capability was originally introduced as part of the `ReverseTopicMappingService`, to allow complex binding models to be mapped back to a single `Topic` entity. There's no reason the opposite shouldn't also be supported—nor is it all that difficult to add this feature. This commit introduces the initial versionof this.
Copy file name to clipboardExpand all lines: OnTopic/Mapping/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,10 +103,10 @@ To support the mapping, a variety of `Attribute` classes are provided for decora
103
103
-**`[Relationship(key, type)]`**: For a collection, optionally specifies the name of the key to look for, instead of the property name, and the relationship type, in case the key name is ambiguous.
104
104
-**`[Follow(relationships)]`**: Instructs the code to populate the specified relationships on any view models within a collection.
105
105
-**`[Flatten]`**: Includes all descendants for every item in the collection. If the collection enforces uniqueness, duplicates will be removed.
106
+
-**`[MapToParent]`**: Allows the attributes of a topic to be applied to a child complex object, optionally including a prefix.
106
107
107
108
### `ReverseTopicMappingService`
108
109
-**`[DisableMapping]`**: Prevents the `ReverseTopicMappingService` from attempting to map the property back to the target `Topic`.
109
-
-**`[MapToParent]`**: Allows the `ReverseTopicMappingService` to map a complex property type back to a `Topic`.
110
110
111
111
### Example
112
112
The following is an example of a data transfer object that implements the above attributes:
0 commit comments