Hello together,
I have some trouble to get a query working, maybe someone can help me with the syntax
I have two Tables here
Diary
- idDiaryEntry
-fkIdProductCode (which is the foreignKey to the primary key of an Item in second table)
FDBProducts
-idCode (primary key)
-product_name
The expansion via the navigation property fkDiaryToFDBProducts is working if I do not use the last filter statement in the query below
What I am trying to achive now, is to filter all entries whose product_name start with the letter "M""
The url below is one of many tries I did to get it working. Unfortunately, I do not undertstand how this all shall be used together with the lambda variable name "a" here
https://morpheus.fritz.box/odata4/svc/my_nutri_diary/Diary?$select=idDiaryEntry&$expand=fkDiaryToFDBProducts($select=idCode,product_name)&$filter= fkDiaryToFDBProducts/product_name/all(a:contains(a/product_name,%27M%27))
It is an aliasing construct in the OData spec, by defining the "a:" you defined the alias for "a". Check the OData documents more information.