api - Expand Query Azure Mobile Services to children of children -
i've been able use expand attribute in c# api azure mobile services expand child object , works great.
however, child object has child object, want able use when getting top level item.
that is, i'm querying table items, has property "subcategory", subcategory object has property "parentcategory".
i want able populate objects 2 levels down, seems $expand query work on direct properties of table being queried.
is there way want? i'm wanting when show list of items, show both subcategory , parent category in table. right now, can see subcategory, parent property of subcategory null.
i thought perhaps adding parentcategoryid , parentcategory objects dataobject definitions, seems incorrect, since have maintain integrity manually, instead of letting link via subcategory property...
any ideas?
it sounds need recursive query, handled common table expressions. way create view within sql has parentcategory , subcategory every item. search can target parentcategory or subcategory easily.
you can check out article on hierarchical queries here: https://en.wikipedia.org/wiki/hierarchical_and_recursive_queries_in_sql
although technique documented oracle db, can read how sql server (and sql azure) handles here: https://msdn.microsoft.com/en-us/library/ms186243.aspx
then write table controller access view.
Comments
Post a Comment