Issue Details (XML | Word | Printable)

Key: DNET-816
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Jiri Cincura
Reporter: Adriano dos Santos Fernandes
Votes: 0
Watchers: 0
Operations

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

Wrong EntityFramewordCore command with Asp.Net Core Identity

Created: 23/Apr/18 01:56 AM   Updated: 06/Jun/18 11:46 AM
Component/s: Entity Framework Core
Affects Version/s: 6.0.0.0
Fix Version/s: 6.0.0.0

File Attachments: 1. Zip Archive dnet-816.zip (89 kB)

Environment:
<PackageReference Include="FirebirdSql.Data.FirebirdClient" Version="6.0.0-*" />
<PackageReference Include="FirebirdSql.EntityFrameworkCore.Firebird" Version="6.0.0-*" />


 Description  « Hide
OnModelCreating has:

builder.Entity<IdentityUser>().ToTable("IDENTITY_USER")
.Ignore(u => u.LockoutEnd);

builder.Entity<IdentityUser>()
.Property(p => p.Id).HasColumnName("ID");

builder.Entity<IdentityUser>()
.Property(p => p.AccessFailedCount).HasColumnName("ACCESS_FAILED_COUNT");

builder.Entity<IdentityUser>()
.Property(p => p.ConcurrencyStamp).HasColumnName("CONCURRENCY_STAMP");

builder.Entity<IdentityUser>()
.Property("Discriminator").HasColumnName("DISCRIMINATOR");

builder.Entity<IdentityUser>()
.Property(p => p.Email).HasColumnName("EMAIL");

builder.Entity<IdentityUser>()
.Property(p => p.EmailConfirmed).HasColumnName("EMAIL_CONFIRMED");

builder.Entity<IdentityUser>()
.Property(p => p.LockoutEnabled).HasColumnName("LOCKOUT_ENABLED");

builder.Entity<IdentityUser>()
.Property(p => p.NormalizedEmail).HasColumnName("NORMALIZED_EMAIL");

builder.Entity<IdentityUser>()
.Property(p => p.NormalizedUserName).HasColumnName("NORMALIZED_USER_NAME");

builder.Entity<IdentityUser>()
.Property(p => p.PasswordHash).HasColumnName("PASSWORD_HASH");

builder.Entity<IdentityUser>()
.Property(p => p.PhoneNumber).HasColumnName("PHONE_NUMBER");

builder.Entity<IdentityUser>()
.Property(p => p.PhoneNumberConfirmed).HasColumnName("PHONE_NUMBER_CONFIRMED");

builder.Entity<IdentityUser>()
.Property(p => p.SecurityStamp).HasColumnName("SECURITY_STAMP");

builder.Entity<IdentityUser>()
.Property(p => p.TwoFactorEnabled).HasColumnName("TWO_FACTOR_ENABLED");

builder.Entity<IdentityUser>()
.Property(p => p.UserName).HasColumnName("USER_NAME");


Error:

fail: Microsoft.EntityFrameworkCore.Database.Command[20102]
      Failed executing DbCommand (55ms) [Parameters=[@p0='?' (Size = 256), @p1='?', @p14='?' (Size = 8191), @p2='?' (Size = 8191), @p3='?' (Size = 256), @p4='?', @p5='?', @p6='?' (Size = 256), @p7='?' (Size = 256), @p8='?' (Size = 8191), @p9='?' (Size = 8191), @p10='?', @p11='?' (Size = 8191), @p12='?', @p13='?' (Size = 256)], CommandType='Text', CommandTimeout='30']
      EXECUTE BLOCK (p0 VARCHAR(256) = ?, p1 INTEGER = ?, p2 VARCHAR(8191) = ?, p3 VARCHAR(256) = ?, p4 BOOLEAN = ?, p5 BOOLEAN = ?, p6 VARCHAR(256) = ?, p7 VARCHAR(256) = ?, p8 VARCHAR(8191) = ?, p9 VARCHAR(8191) = ?, p10 BOOLEAN = ?, p11 VARCHAR(8191) = ?, p12 BOOLEAN = ?, p13 VARCHAR(256) = ?)
      RETURNS (ROWS_AFFECTED INT)
      AS
      BEGIN
      UPDATE "IDENTITY_USER" SET "ACCESS_FAILED_COUNT" = :p1, "CONCURRENCY_STAMP" = :p14, "EMAIL" = :p3, "EMAIL_CONFIRMED" = :p4, "LOCKOUT_ENABLED" = :p5, "NORMALIZED_EMAIL" = :p6, "NORMALIZED_USER_NAME" = :p7, "PASSWORD_HASH" = :p8, "PHONE_NUMBER" = :p9, "PHONE_NUMBER_CONFIRMED" = :p10, "SECURITY_STAMP" = :p11, "TWO_FACTOR_ENABLED" = :p12, "USER_NAME" = :p13
      WHERE "ID" = :p0 AND "CONCURRENCY_STAMP" = :p2;
      ROWS_AFFECTED = ROW_COUNT;
      SUSPEND;
      END
      ;
FirebirdSql.Data.FirebirdClient.FbException (0x80004005): Dynamic SQL Error
SQL error code = -206
Column unknown
P14
At line 5, column 79 ---> Dynamic SQL Error
SQL error code = -206
Column unknown
P14
At line 5, column 79

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Jiri Cincura added a comment - 15/May/18 10:19 AM
Can you share a project? I'm unable to replicate it (using `beta1`).

Adriano dos Santos Fernandes added a comment - 16/May/18 12:42 AM
Configure database location in Startup.cs and run it.

Adriano dos Santos Fernandes added a comment - 16/May/18 10:50 AM
Jiri, in what repository and branch the fix was committed?

Jiri Cincura added a comment - 16/May/18 12:49 PM
It's in this branch https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient/tree/update-params. I'll merge it into master momentarily.