Closed JuanGoDev closed 1 year ago
Thanks, let me work with @ElizabethOkerio to see if we can get $top
addressed as well.
Gracias, déjame trabajar con@ElizabethOkeriopara ver si podemos ser
$top
atendidos también.
Perfect, I'm attentive!
@JuanGoDev The issue here is the use of $filter with $apply and all the other query options and that was fixed here: https://github.com/OData/AspNetCoreOData/pull/940. This is yet to be released. You can test this out and let us know whether it works as we prepare to do a release.
@JuanGoDev El problema aquí es el uso de $filter con $apply y todas las demás opciones de consulta y eso se solucionó aquí: #940 . Esto aún no se ha publicado. Puede probar esto y decirnos si funciona mientras nos preparamos para hacer un lanzamiento.
@ElizabethOkerio related to #940 , did not work for me, $apply combined with /groupby and $filter does work, but when I add the $top the error persists.
Ok. will take a look.
@ElizabethOkerio @xuzhg Hi Elizabeth Okerio, first of all thank you for your help and the help of the OData team.
After upgrading the OData version to 8.2.1 I started to experience another error, which as far as I have been able to find out is related to the $expand option, I will tell you what is happening to me:
Example of OData paths with which I am experiencing error:
http://localhost:49350/odata/v1/categoryelements?$expand=category
https://localhost:49350/v1/odata/categoryelements?$expand=category,icon&$top=10
When generating the response to the OData query, the JSON values are generated incomplete, and therefore my API generates error when deserializing the response.
Among other paths in which $expand is used.
But the funny thing is that I had as a premise that this happened with my OData paths where I implemented $expand, but it didn't, for example the following OData path worked for me:
Can you help me with some information to let me know if this error is due to some change in the edm model, or what may be happening in my case, thank you very much for your help.
OData Version: Microsoft.AspNetCore.OData - 8.2.0
.Net 6.0
Previously, I was using Microsoft.AspNetCore.OData version 8.0.12, and when combining the $apply query option with the /groupby transformation and the $orderby clause, I was encountering the following exception:
This exception was fixed by updating the Microsoft.AspNetCore.OData library to version 8.2.0.
However, in the structure of my OData query, I am using the $top clause, which is generating the same exception as before.
Example Query:
$apply=filter((elementId%20eq%20375895)%20and%20(contains(node/name,%27A%27)))/groupby((node/nodeid,%20node/name))&$orderby=node/name&$top=70&$count=true
This is an obstacle that my team is facing when implementing OData in version 8.2.0 because without the $top clause in our OData query, it would not be optimal.
In conclusion, the error is occurring when using the $top clause combined with the /groupby transformation within the $apply clause.