Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default value [DNET873] #803

Closed
firebird-automations opened this issue Mar 14, 2019 · 4 comments
Closed

Default value [DNET873] #803

firebird-automations opened this issue Mar 14, 2019 · 4 comments

Comments

@firebird-automations
Copy link

Submitted by: Ulf Prill (cataurus)

Attachments:
IssueProj.7z

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

Commits: 3b007d3

@firebird-automations
Copy link
Author

Modified by: Ulf Prill (cataurus)

Version: 6.5.0.0 [ 10887 ]

@firebird-automations
Copy link
Author

Commented by: Ulf Prill (cataurus)

test project

@firebird-automations
Copy link
Author

Modified by: Ulf Prill (cataurus)

Attachment: IssueProj.7z [ 13325 ]

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 6.6.0.0 [ 10890 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants