我在模型优先模式(= EDMX)下使用 System.Data.SQLite 1.0.90 与 VS2013 和 EntityFramework 5。
我创建了一个新的 SQLite 数据库,其中包含一个表:
CREATE TABLE [..]
[Test1integer] integer,
[Test2int] int,
[Test3smallint] smallint,
[Test4tinyint] tinyint,
[Test5bigint] bigint,
[Test6money] money,
[Test7float] float,
[Test8real] real,
[Test9decimal] decimal,
[Test10numeric18_5] numeric(18,5), [..]
相关部分是Test7float
and Test8real
.
执行后从数据库更新模型...EDMX 现在包含以下内容:
SSDL:
<Property Name="Test1integer" Type="integer" />
<Property Name="Test2int" Type="int" />
<Property Name="Test3smallint" Type="smallint" />
<Property Name="Test4tinyint" Type="tinyint" />
<Property Name="Test5bigint" Type="integer" />
<Property Name="Test6money" Type="decimal" Precision="53" Scale="0" />
<Property Name="Test7float" Type="real" />
<Property Name="Test8real" Type="real" />
<Property Name="Test9decimal" Type="decimal" Precision="53" Scale="0" />
<Property Name="Test10numeric18_5" Type="decimal" Precision="18" Scale="5" />
相关部分是Test7float
and Test8real
.
CSDL:
<Property Name="Test1integer" Type="Int64" />
<Property Name="Test2int" Type="Int32" />
<Property Name="Test3smallint" Type="Int16" />
<Property Name="Test4tinyint" Type="Byte" />
<Property Name="Test5bigint" Type="Int64" />
<Property Name="Test6money" Type="Decimal" Precision="53" Scale="0" />
<Property Name="Test7float" Type="Single" />
<Property Name="Test8real" Type="Single" />
<Property Name="Test9decimal" Type="Decimal" Precision="53" Scale="0" />
<Property Name="Test10numeric18_5" Type="Decimal" Precision="18" Scale="5" />
相关部分是Test7float
and Test8real
.
Problem
Test7float
错误地变成了“real”+“Single”——而且设计者也不允许这里使用“Double”。
SQLite3 文档(http://www.sqlite.org/datatype3.html)明确指出“real”是 8 字节 IEEE 浮点数,而“float”只是“real”的同义词——因此在任何情况下,“Double”(8 字节)应优先于“Single”(4字节)。
我是否做错了什么或者我误解了什么?如果不是:哪里出了问题以及如何解决?
我应该为此创建一个错误报告吗?