Quantcast
Channel: Optimizely Search & Navigation
Viewing all articles
Browse latest Browse all 6894

Nested Convetion not working for extension methods

$
0
0

Hi, I have an extension method that returns an list of object with properies that I want to be able to filter and sort on.

clientConventions.ForInstancesOf<WebProduct>().IncludeField(document => document.FindVariations());
clientConventions.NestedConventions.ForType<WebProduct>().Add(document => document.FindVariations());

But when I try to filter or sort on the extension method I get an error saying that the it isn't a nested object. And if I look in the index I can see that the property is missing the $$nested sufix.

"FindVariations": [
        {"$type": "Avensia.Storefront.Starter.Infrastructure.Find.Models.FindWebVariation, Avensia.Storefront.Starter",
}

Thi problem only seems to happen when its an extension method.

According to https://world.episerver.com/documentation/developer-guides/find/NET-Client-API/searching/nested-queries/ this should work and I can't find anything suggesting otherwise.


Viewing all articles
Browse latest Browse all 6894

Trending Articles