Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Aaron Mitchard 7 posts 47 karma points
    Jan 09, 2015 @ 13:45
    Aaron Mitchard
    0

    Property Mapping issue

    Hi,

    I think there might be an issue with the following example. So I've got a custom mapping setup and the PropertyMapping attribute on my viewmodel which points to a different source property. However when it reaches the mapping method isRecursive is always false, if I switch my properties to match up it works... Having a (very) quick scan of the codebase does the recursive property lookup take in to account the adjusted property name?

    [PropertyMapping(SourceProperty = "PropertyWithDifferentName", MapRecursively = true)]
    public ContentUrlLink AgentLoginLink { get; set; }
    public static object GetContentUrlLink(IUmbracoMapper mapper, IPublishedContent contentToMapFrom, string propName, bool isRecursive) {
    return GetContentUrlLink(contentToMapFrom.GetPropertyValue(propName, isRecursive, null));
    }

    Nice one, Aaron.

    * Loving UmbracoMapper btw! :)

  • Andy Butland 422 posts 2333 karma points MVP 4x hq c-trib
    Jan 09, 2015 @ 22:14
    Andy Butland
    100

    Hi Aaron

    Thanks for this, good spot - you're right there was an error there.  I've fixed with this commit.

    Also updated on NuGet and our.umbraco.org if you want to pull in the latest version.

    Cheers

    Andy

     

  • Aaron Mitchard 7 posts 47 karma points
    Jan 09, 2015 @ 22:29
    Aaron Mitchard
    0

    Awesome, thanks for the quick update!

Please Sign in or register to post replies

Write your reply to:

Draft