Skip to content
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

DateTimeOffset is not supported on POST #14

Open
brainwipe opened this issue Aug 28, 2016 · 1 comment
Open

DateTimeOffset is not supported on POST #14

brainwipe opened this issue Aug 28, 2016 · 1 comment
Labels

Comments

@brainwipe
Copy link
Owner

When you POST a document that uses the C# type DateTimeOffset, you will receive a 500 error, internally this is an InvalidCastException.

GET works fine as this is a simpler serialisation.

Investigation

I believe it is because the attribute holding the time is being cast into a DateTime type rather than DateTimeOffset.

@brainwipe brainwipe added the bug label Aug 28, 2016
@brainwipe brainwipe added this to the 1.0.6 milestone Sep 5, 2016
@brainwipe brainwipe modified the milestones: 1.0.6, 1.0.7 Oct 4, 2016
@cnolewajka
Copy link

I think this is related to the type conversions on POST/PATCH. The Delta object key/value pairs have wrong typed values for given properties. For instance, long (for an int in the model) or a double (for a Decimal in the model). It looks like de-serialization on POST/PATCH is either not using the right type information or entirely ignores it. This is quite an issue even for simple properties. Even the sample project stops working when you add an int property to Article model and try to POST or PATCH.

@brainwipe brainwipe removed this from the 1.0.7 milestone Feb 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants