olingo - OData Filter for child and return parent -


i developing search function powered odata service. return 1 or list of header objects results. many fields need search on not in header object. in child objects(navigational properties). right approach able execute odata search against child field , still return parent object list.

this similar expect able in standard sql 'exists' query.

i using java - apache olingo project believe general odata question.

yes possible, include child path in $filter

e.g. have header aircraft , child airline

/aircraft list aircraft airlines aircraft?$filter=airline/code eq 'ba' list aircraft ba only

for 2nd query, return child , filter on parent... not sure returning child - can if resolve single parent key, e.g. aircraft(123)/airline - find aircraft key 123 , return airline child navigation property info

to filter , include multiple headers, think option use $expand include child info header info. e.g.

aircraft?$filter=bodytype eq 'nb'&$expand=airline - filters header aircraft on type nb (narrow body), , includes child airline info along it.

hope helps.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -