Copied to clipboard

Flag this post as spam?

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


  • Fido 9 posts 41 karma points
    Sep 05, 2013 @ 20:11
    Fido
    0

    Select nodes by value from data type grid

    Hello!

    I would like to create something like recipe site. There will be about 5k nodes of the same type (recipe). For each such a node I need to store ingredients. All ingredients will be represented as nodes /ingredients/{category}/{ingredient_name} For each particular recipe ingredients will be saved in data type grid and one of data type grid's fileds will be ingredientNodeId (other will be quantity and so on).

    I need to select recipes by ingredient. So in plain english I need to make such a queries: Select all nodes, where data type grid contains row with ingredientNodeId filed = X. I would like to ask you, if is this approach possible and if yes, then will these queries be fast enough?

    Thank you.

  • Jeroen Breuer 4861 posts 12138 karma points MVP 3x admin c-trib
    Sep 05, 2013 @ 22:50
    Jeroen Breuer
    100

    Hello,

    This should be possible.

    You can fetch the data with IPublishedContent queries: http://our.umbraco.org/documentation/Reference/Mvc/querying

    Or you could write a query with some inner joins which goed directly to the Umbraco database, but that won't be easy.

    Jeroen

  • Fido 9 posts 41 karma points
    Sep 06, 2013 @ 01:00
    Fido
    0

    Hello Jeroen!

    You are right, I forgot about the possiblity to query database directly and I am sure it will be fast enough.

    Thank you very much for the advice!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies