I would like to use OData service to get component presentations based on conditions, but I am running into some problems. I am aware that Tridion OData service is "limited" OData, so I was wondering is something like this possible through Tridion OData (in a single query):
Get all component presentations where CT has id 40 and Component contains keyword A and keyword B.
I have tried filtering on custom metas and expanding on Component/ComponentPresentations but this is not returning only items that I need I can not filter further on the expanded set...
Is this possible with OData or should I "play it safe" and just use broker api ?
Adding additional information:
Slightly simplifying scenario to better explain what I am trying to do:
Get all CP's from publication 1 based on custom meta
...odata.svc/CustomMetas?$filter=KeyName eq 'Rank' and StringValue eq 'A' and PublicationId eq 1 &$expand=Component/ComponentPresentations
Get all CP's based on CT ID
...odata.svc/ComponentPresentations?$filter=PublicationId eq 1 and TemplateId eq 40&$expand=Component/CustomMetas
How do I combine these two conditions and get all CP's which are rendered with CT 40 and have keyword Rank with value A in just a single call to odata ?