Double.NaN is stored and retrieved as null (EF6 Code First)

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for SQLite
Post Reply
bairog
Posts: 105
Joined: Mon 29 Apr 2013 09:05

Double.NaN is stored and retrieved as null (EF6 Code First)

Post by bairog » Tue 18 Sep 2018 09:31

Hello.
Assume we have the following entity:

Code: Select all

    public class User
    {
        public Guid Id { get; set; }
        public String Name { get; set; }
        public Double? Age { get; set; }  
    } 
User with Age=Double.NaN is stored to database and retrieved from it as null (real column type with null allowed).
User with Age=null is also stored to database and retrieved from it as null (that works as I expect).
Double.PositiveInfinity and Double.NegativeInfinity are also saved and retrieved correctly.

So why Double.NaN is not working?

I use dotConnect for SQLite 5.11.1202.
Last edited by bairog on Wed 24 Oct 2018 05:08, edited 2 times in total.

Shalex
Site Admin
Posts: 8747
Joined: Thu 14 Aug 2008 12:44

Re: Double.NaN is stored and retrieved as null (EF Code First)

Post by Shalex » Sat 22 Sep 2018 17:29

Thank you for your report. You are working with EF6, aren't you? We have reproduced the issue. We will investigate it and notify you about the result.

bairog
Posts: 105
Joined: Mon 29 Apr 2013 09:05

Re: Double.NaN is stored and retrieved as null (EF Code First)

Post by bairog » Wed 24 Oct 2018 05:07

Yes, I use EF6.
So how is your investigation going?

Shalex
Site Admin
Posts: 8747
Joined: Thu 14 Aug 2008 12:44

Re: Double.NaN is stored and retrieved as null (EF6 Code First)

Post by Shalex » Fri 26 Oct 2018 18:20

The investigation is in progress. As soon as we have any result, we will let you know.

Post Reply