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

Wrong EntityFramewordCore command with Asp.Net Core Identity [DNET816] #751

Closed
firebird-automations opened this issue Apr 23, 2018 · 9 comments

Comments

@firebird-automations
Copy link

Submitted by: @asfernandes

Attachments:
dnet-816.zip

OnModelCreating has:

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

builder.Entity<IdentityUser>()
.Property(p => http://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

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-automations
Copy link
Author

Modified by: @cincuranet

Fix Version: 6.0.0.0 [ 10850 ]

@firebird-automations
Copy link
Author

Commented by: @cincuranet

Can you share a project? I'm unable to replicate it (using `beta1`).

@firebird-automations
Copy link
Author

Commented by: @asfernandes

Configure database location in Startup.cs and run it.

@firebird-automations
Copy link
Author

Modified by: @asfernandes

Attachment: dnet-816.zip [ 13248 ]

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: In Progress [ 3 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Author

Commented by: @asfernandes

Jiri, in what repository and branch the fix was committed?

@firebird-automations
Copy link
Author

Commented by: @cincuranet

It's in this branch https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient/tree/update-params. I'll merge it into master momentarily.

@firebird-automations
Copy link
Author

Modified by: @cincuranet

Version: 6.0.0.0 [ 10850 ]

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