Default value
-------------
Key: DNET-873
URL: http://tracker.firebirdsql.org/browse/DNET-873
Project: .NET Data provider
Issue Type: Bug
Components: Entity Framework Core
Environment: Visual Studio Community 2017
Reporter: Ulf Prill
Assignee: Jiri Cincura
public class Rating
{
public long ID { get; set; }
public uint Value { get; set; }
}
public class IssueProjDaten : DbContext
{
public DbSet<Rating> Ratings { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseFirebird(@"User=SYSDBA;Password=masterkey;Database=D:\Database\IssueProj.fdb");
base.OnConfiguring(optionsBuilder);
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.Entity<Rating>().Property("Value").HasDefaultValue(0);
}
}
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Test App for Issue");
using (var daten = new IssueProjDaten())
{
daten.Database.Migrate();
}
}
}
Create a exception:
FirebirdSql.Data.FirebirdClient Information: 0 : Command:
CREATE TABLE "Ratings" (
"ID" BIGINT NOT NULL,
"Value" BIGINT NOT NULL DEFAULT 0,
CONSTRAINT "PK_Ratings" PRIMARY KEY ("ID")
);
Parameters:
<no parameters>
Ausnahme ausgelöst: "FirebirdSql.Data.FirebirdClient.FbException" in Microsoft.EntityFrameworkCore.Relational.dll
Ein Ausnahmefehler des Typs "FirebirdSql.Data.FirebirdClient.FbException" ist in Microsoft.EntityFrameworkCore.Relational.dll aufgetreten.
Dynamic SQL Error
SQL error code = -104
Token unknown - line 3, column 29
DEFAULT
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|