Copied to clipboard

Flag this post as spam?

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


  • Devin Bost 37 posts 78 karma points c-trib
    Dec 09, 2014 @ 17:30
    Devin Bost
    0

    Getting database type from IContent property?

    Hi,

    What is the easiest way to get the underlying database type for a property on an IContent object? I know how to obtain the PropertyEditorAlias, but that is not always helpful, for example, because knowing that the property is an "Umbraco.MultiNodeTreePicker" tells me nothing about the underlying data storage. (I am attempting to resolve the type to map from another database.) Can anybody bring some light to this?

    Thanks, Devin

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Dec 09, 2014 @ 21:50
    Jan Skovgaard
    1

    Hi Devin

    If you're trying to map data from another database perhaps the CMS import package could save you some time?

    /Jan

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Dec 10, 2014 @ 13:54
    Dave Woestenborghs
    0

    I agree with Jan. Try CMS Import. It's much easier than creating your own import

  • Devin Bost 37 posts 78 karma points c-trib
    Dec 10, 2014 @ 14:38
    Devin Bost
    0

    Hi Guys,

    Thanks for the suggestion. I just now sent them an email to find out if their API offers the granularity that I am looking for.

    -Devin

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Dec 10, 2014 @ 15:01
    Richard Soeteman
    0

    Hi Devin,

    Will reply this also to your email. But why do you want to know the underlying data type? CMSImport just handles the multi node tree picker data. For content all you need to do is make sure the related item exists and for media you need to make sure the media item is available on disk.

    For the rest it's just mapping the items using pull down menu's no need to code :)

    Best,

    Richard

  • Devin Bost 37 posts 78 karma points c-trib
    Dec 10, 2014 @ 15:33
    Devin Bost
    0

    I'm trying to figure out a way to work around the problem described here:

    How to access the Angular service (provided by a custom property editor/data type) output from an API controller

    If you skip to the bottom, the post with the images, you should be able to see what I was attempting to accomplish.

    The idea for a work-around that motivated my creation of this current thread was to resolve the value directly from the database somehow. I was trying to figure out how to use a SQL CLR function to query Umbraco directly so that I could use a UDF to provide the desired computation. However, trying to hack the SQL CLR can become very ugly very quickly.

    Does that answer your question?

    -Devin

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Dec 10, 2014 @ 16:09
    Richard Soeteman
    0

    Hi Devin,

    I don't think CMSImport can help with that. CMSImport is just for import data from one system to another.

    Best,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft