-
Notifications
You must be signed in to change notification settings - Fork 170
DateOnly quering not working #545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What problem? Can you elaborate a bit more and include a repro of the issue?
I assume you mean OData's own custom date only class and not .NET6's type, right? .NET6 |
I thought this is already implemented OData/ModelBuilder#22 |
HI! any news? |
Seems to be working in regular filter/select, but when trying to group by "DateOnly" field it throws "System.NullReferenceException: Object reference not set to an instance of an object." Can anyone suggest a workaround to this issue for now? String is: "Results?apply=filter(projectId eq 1982)/groupby((projectId,answerText,responseDate),aggregate(weight with sum as sumWeight,id with countdistinct as count))" That response date is causing the problem. Replacing it with any other column (including datetime) works just fine. But when its DateOnly I get that null ref. |
Getting this error when using DateOnly and Time Only or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'. See https://go.microsoft.com/fwlink/?linkid=2101038 for more information. EF Core 7 |
Similar error when I do a patch request. I am required to provide date only eg "2022-01-20". If I provide a datetime in the JSON eg "0001-02-24T00:00:00.000Z" I get an error saying : System.NullReferenceException: Object reference not set to an instance of an object. |
Hello, OData Team. Question #1. What's the current support of DateOnly and TimeOnly types in the latest ASP.NET Core Web API/OData versions (primarily for .NET 8+ and EF Core 8+) and limitations? Motivation: Because of the EF Core 8 breaking change and a huge adoption of EF Core 8 by developers after .NET 8 release last year (a tweet by MSFT), we at DevExpress want to support these newest types for the following CRUD scenarios:
I saw another issue OData/ModelBuilder#22, but wanted to verify it directly with your team. Thanks, |
Hi, any news? |
I am getting the following error when trying to filter on a sql nullable 'Date' column (DateOnly? type in .NET):
Is there a solution at the moment, or do we have to wait for a fix in the repo? |
Any timeframe for DateOnly/TimeOnly support for odata? We have sql data of Date type (instead of DateTime) and would love to be able to use DateOnly properties on entities. Currently our odata queries time out with large top and skip parameter values if DateOnly properties are included in the $select clause. Removing dateonly properties fixes the issue and queries finish almost instantly. Edit: We are also using ef core so is it possible that odata is trying to do client side parsing of the data? (that ef core does not support anymore imo) |
Hi,
We are currently working on a project with .Net 6, EF Core 6, Npgsql provider and AspNetCore.OData. There is still a problem with the Expression generation because the expression tree contains elements with 'System.Nullable`1[Microsoft.OData.Edm.Date]'.
I think these elements should be of type DateOnly.
The text was updated successfully, but these errors were encountered: