Repository navigation
group by on date throws exceptions - #2302
Merged
ElizabethOkerio merged 2 commits intoOct 8, 2020
Merged
ElizabethOkerio merged 2 commits into
ElizabethOkerio merged 2 commits into
Conversation
ElizabethOkerio
marked this pull request as ready for review
October 5, 2020 13:40
gathogojr
reviewed
Oct 5, 2020
ElizabethOkerio
force-pushed
the
fix/2296_group_by_datetime_exceptions
branch
2 times, most recently
from
October 6, 2020 12:28
5722272 to
fbd6a58
Compare
ElizabethOkerio
force-pushed
the
fix/2296_group_by_datetime_exceptions
branch
from
October 6, 2020 13:31
fbd6a58 to
35b8e28
Compare
KenitoInc
approved these changes
Oct 7, 2020
This was
linked to
issues
Oct 7, 2020
xuzhg
reviewed
Oct 8, 2020
|
|
||
| HttpResponseMessage response = await Client.GetAsync(requestUri); | ||
|
|
||
| Assert.Equal(HttpStatusCode.OK, response.StatusCode); |
Contributor
There was a problem hiding this comment.
Assert.Equal(HttpStatusCode.OK, response.StatusCode); [](start = 12, length = 53)
at least verify the repsonse content?
xuzhg
reviewed
Oct 8, 2020
| property = new ODataProperty | ||
| { | ||
| Name = prop.Key, | ||
| Value = ODataPrimitiveSerializer.ConvertPrimitiveValue(prop.Value, edmProperty.Type.AsPrimitive()) |
Contributor
There was a problem hiding this comment.
edmProperty.Type.AsPrimitive() [](start = 103, length = 30)
It is always a primitives' type?
xuzhg
reviewed
Oct 8, 2020
| foreach (var prop in dynamicObject.Values) | ||
| { | ||
| IEdmProperty edmProperty = entityType?.Properties() | ||
| .FirstOrDefault(p => p.Name.Equals(prop.Key)); |
Contributor
There was a problem hiding this comment.
p.Name.Equals(prop.Key) [](start = 49, length = 23)
Why simple compare the property name here?
- does it case sensitive?
- property alias?
xuzhg
pushed a commit
that referenced
this pull request
May 29, 2026
* group by on date throws exceptions * fix based on review comments
pull Bot
pushed a commit
to ehtick/WebApi
that referenced
this pull request
May 29, 2026
* group by on date throws exceptions * fix based on review comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues
This pull request fixes issue #2296 , #912, #1945, #918
Description
OData doesn't include DateTime as a primitive type. If a user defines a model as
public class Customer { public int Id { get; set; } public DateTime Birthday { get; set; } }then tries to do a groupBy using the Birthday Column, an exception is thrown.
Checklist (Uncheck if it is not completed)
Additional work necessary
If documentation update is needed, please add "Docs Needed" label to the issue and provide details about the required document change in the issue.