Issue Details (XML | Word | Printable)

Key: DNET-873
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Jiri Cincura
Reporter: Ulf Prill
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
.NET Data provider

Default value

Created: 14/Mar/19 01:07 PM   Updated: 19/Mar/19 08:25 PM
Component/s: Entity Framework Core
Affects Version/s: 6.5.0.0
Fix Version/s: 6.6.0.0

File Attachments: 1. File IssueProj.7z (599 kB)

Environment: Visual Studio Community 2017


 Description  « Hide
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



 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Ulf Prill added a comment - 14/Mar/19 02:27 PM
test project