We're using Find 13.4.5, and attempting to use a dictionary to store computed prices where the keys are a string composed of specifc account details. We'd like to allow users to sort products by this computed value, but calling OrderBy/OrderByDescending seem to output the json request without the key IE:
where PriceDictionaryMethodName is a static method returning a Dictionary<string, decimal>. This results in no sort being applied. Modifying the request to include the key appears works correctly IE:
seems to order them correctly. Is there a way to force this in the json query? I've tried Dictionary2Find, but that doesn't seem to work. It would be great to have this work correctly for projections too.
Do you have any alternatives tried out or in mind? How many keys are in the dictionary typically and how big is the model that owns the dictionary property?
We're using Find 13.4.5, and attempting to use a dictionary to store computed prices where the keys are a string composed of specifc account details. We'd like to allow users to sort products by this computed value, but calling OrderBy/OrderByDescending seem to output the json request without the key IE:
"sort":[{"PriceDictionaryMethodName$$number":{"missing":"_last","unmapped_type":"double"}}]
where PriceDictionaryMethodName is a static method returning a Dictionary<string, decimal>. This results in no sort being applied. Modifying the request to include the key appears works correctly IE:
"sort":[{"PriceDictionaryMethodName.Key$$number":{"missing":"_last","unmapped_type":"double"}}]
seems to order them correctly. Is there a way to force this in the json query? I've tried Dictionary2Find, but that doesn't seem to work. It would be great to have this work correctly for projections too.
Add a support ticket if you haven't already.