Copied to clipboard

Flag this post as spam?

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


  • Matias Korn 30 posts 49 karma points
    Jun 18, 2012 @ 12:46
    Matias Korn
    0

    Umbraco member data

    Hello everybody, how do you store the member data. I am using properties for the "single" user data like adress and so on, but what about one to many realtions data, like more than one picture that is associated to the user.

    The stupid way in my opinion would be to make a docType and then list all the picture under a node and inside every docType there is a field with the member id that the document or picture is associated to.

    Thanks for your help and maybe ideas.

  • Jamie Pollock 174 posts 853 karma points c-trib
    Jun 18, 2012 @ 13:08
    Jamie Pollock
    1

    Hi Matias,
    One approach you could consider is using Umbraco Relations. It's not often discussed because without the Umbraco Relation Types package you'd need to dig into the SQL to set them up.

    This basically allows you to create a link between two object types (eg Member & Media) and then assign an alias to it. In this case you could have the Member as a the parent and the media node as the child and possibly call the relation "member2Media".

    Then a bit of custom code or data type could then assign them two together. But it's as simple as Relation.MakeNew(memberId, mediaId, RelationType.GetByAlias("member2Media")); for that.

    I hope this helps,

    Jamie

  • Matias Korn 30 posts 49 karma points
    Jun 18, 2012 @ 13:34
    Matias Korn
    0

    Thank you! it have annoyed me so extremly much that i had to make "bad solutions" and so on because i couldn't make "real" relations, looks like the solution. Thanks for your help!!!!!!

  • Jamie Pollock 174 posts 853 karma points c-trib
    Jun 18, 2012 @ 13:39
    Jamie Pollock
    0

    No problem, mate!

Please Sign in or register to post replies

Write your reply to:

Draft