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?
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.
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
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!
is working on a reply...