Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2
[MapToParent] should inherit parent's attributePrefix #149
Copy link
Copy link
Open
Labels
Area: MappingRelates to one of the `ITopicMappingService` interfaces or implementations.Relates to one of the `ITopicMappingService` interfaces or implementations.Priority: 0Severity 2: MajorStatus 2: ScheduledPlanned for an upcoming release.Planned for an upcoming release.Type: BugBehavior that is inconsistent with documented or expected behavior.Behavior that is inconsistent with documented or expected behavior.
Milestone
Description
Metadata
Metadata
Assignees
Labels
Area: MappingRelates to one of the `ITopicMappingService` interfaces or implementations.Relates to one of the `ITopicMappingService` interfaces or implementations.Priority: 0Severity 2: MajorStatus 2: ScheduledPlanned for an upcoming release.Planned for an upcoming release.Type: BugBehavior that is inconsistent with documented or expected behavior.Behavior that is inconsistent with documented or expected behavior.
If a binding model has
[MapToParent]on a property which maps to an object with a[MapToParent]on one of its properties, that grandchild property will be prefixed with the parent's property name, but not the grandparent's property name.Example
In this case, when
Requestis mapped through theReverseTopicMappingService, it will end up with:PrimaryContactNameLocationCityLocationStateSecondaryContactNameLocationCity(collision)LocationState(collision)Instead, the
[MapToParent]onContactshould inherit theattributePrefixfrom the parent's[MapToParent]so you end up with:PrimaryContactNamePrimaryContactLocationCityPrimaryContactLocationStateSecondaryContactNameSecondaryContactLocationCitySecondaryContactLocationStateExplicit
attributePrefixThis should happen even if an
attributePrefixis explicitly declared on the nested[MapToParent]property. So if you had:Then that should output:
PrimaryContactNamePrimaryContactCityPrimaryContactStateSecondaryContactNameSecondaryContactCitySecondaryContactState