Columns for UInt16/32/64 fields are not created in database (EF Code First)

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

Columns for UInt16/32/64 fields are not created in database (EF Code First)

Post by bairog » Wed 16 Aug 2017 06:12

Hello.
Assume we have the following entities:

Code: Select all

public class Complex
    {
        public Int64 int64complex { get; set; }
        public UInt64 Uint64complex { get; set; }
    }

    public class User
    {
        public Guid Id { get; set; }
        public String Name { get; set; }
        public int Age { get; set; }       
        public UInt16 uint16 { get; set; }
        public UInt32 uint32 { get; set; }
        public virtual Complex CPX { get; set; }
    } 
Complex is set as a complex type via:

Code: Select all

modelBuilder.ComplexType<Complex>(); 
When I add a User and save changes to database - columns for UInt16/32/64 fields are not created.
I use dotConnect for SQLite 5.9.931.

Sample project I've uploaded here
Click AddUsersAndMessages() button first to create database (on disk D).

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

Re: Columns for UInt16/32/64 fields are not created in database (EF Code First)

Post by Shalex » Wed 16 Aug 2017 13:06

1. Thank you for your report. We have reproduced the issue and are investigating it. We will notify you about the result.

2. JIC: you should use Devart.Data.SQLite.ProductInfo.Version instead of Devart.Data.ProductInfo.Version in this line of your \DataAccessLayer\DbAccess.cs:

Code: Select all

"Devart.Data.SQLite.SQLiteProviderFactory, Devart.Data.SQLite, Version=" + ProductInfo.Version + ", Culture=neutral, PublicKeyToken=09af7300eec23701");

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

Re: Columns for UInt16/32/64 fields are not created in database (EF Code First)

Post by bairog » Mon 21 Aug 2017 05:27

Shalex wrote:1. Thank you for your report. We have reproduced the issue and are investigating it. We will notify you about the result.
So how does it go? It is a bug - right?
Shalex wrote:2. JIC: you should use Devart.Data.SQLite.ProductInfo.Version instead of Devart.Data.ProductInfo.Version
Thank you - my mistake.
That is because Devart.Data.SQLite.ProductInfo.Version represents version of Devart.Data.SQLite.dll and Devart.Data.ProductInfo.Version represents version of Devart.Data.dll, right?

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

Re: Columns for UInt16/32/64 fields are not created in database (EF Code First)

Post by Shalex » Mon 21 Aug 2017 12:38

bairog wrote:So how does it go? It is a bug - right?
Our current implementation doesn't support unsigned types. The list of supported .NET types: https://www.devart.com/dotconnect/sqlit ... pping.html. We are investigating the question whether to generate an error in case of unsigned type or to support it in some way. We will notify you about the result.
bairog wrote:Thank you - my mistake.
That is because Devart.Data.SQLite.ProductInfo.Version represents version of Devart.Data.SQLite.dll and Devart.Data.ProductInfo.Version represents version of Devart.Data.dll, right?
That is correct.

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

Re: Columns for UInt16/32/64 fields are not created in database (EF Code First)

Post by Shalex » Thu 31 Aug 2017 10:35

Shalex wrote:Our current implementation doesn't support unsigned types. The list of supported .NET types: https://www.devart.com/dotconnect/sqlit ... pping.html. We are investigating the question whether to generate an error in case of unsigned type or to support it in some way. We will notify you about the result.
EF6 and all previous EF versions do not support unsigned types (except for Byte): https://docs.microsoft.com/en-us/dotnet ... data-types. We do not have a technical possibility to overcome this limitation of EF engine (no implementation, no error/warning).

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

Re: Columns for UInt16/32/64 fields are not created in database (EF Code First)

Post by bairog » Thu 31 Aug 2017 12:29

Ok. I'll use signed types instead. Thx for investigation.

Post Reply