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

Errors when using JSON columns #32

Open
urielzen opened this issue Nov 27, 2023 · 1 comment
Open

Errors when using JSON columns #32

urielzen opened this issue Nov 27, 2023 · 1 comment

Comments

@urielzen
Copy link

urielzen commented Nov 27, 2023

Hi, I am using SQL Server, and I have a table with a couple of JSON columns and I get the errors below.

I was wondering if the errors are due to the same limitations found in the README about Version 8 doesn't handle EF Core 8's Value objects

Thank u

builder.Entity<Question>(entity =>
{
    entity
        .ToTable(b => b.IsTemporal())
        .OwnsOne(e => e.QuestionLocked, ownedNavitationBuilder => ownedNavitationBuilder.ToJson())
        .OwnsOne(e => e.ConfigurationInterfaceLocked, ownedNavitationBuilder => ownedNavitationBuilder.ToJson());
});
DIFFERENT: QuestionInterfaceLocked->PrimaryKey '- no primary key -', constraint name. Expected = - no primary key -, found = PK_Questions
NOT IN DATABASE: QuestionInterfaceLocked->ForeignKey 'FK_Questions_Questions_QuestionId', constraint name. Expected = FK_Questions_Questions_QuestionId
DIFFERENT: Entity 'QuestionInterfaceLocked', constraint name. Expected = - no primary key -, found = PK_Questions
DIFFERENT: QuestionLocked->PrimaryKey '- no primary key -', constraint name. Expected = - no primary key -, found = PK_Questions
NOT IN DATABASE: QuestionLocked->ForeignKey 'FK_Questions_Questions_QuestionId', constraint name. Expected = FK_Questions_Questions_QuestionId
DIFFERENT: Entity 'QuestionLocked', constraint name. Expected = - no primary key -, found = PK_Questions
EXTRA IN DATABASE: Table 'Questions', column name. Found = QuestionLocked
EXTRA IN DATABASE: Table 'Questions', column name. Found = ConfigurationInterfaceLocked
@JonPSmith
Copy link
Owner

Hi,

I have just released version 8.1.0 which checks Json Mapping, but it has an limitation that the Json Mapping checking assumes you are using the default name for the column, which is the name of the property.

Let me know if this works for you.

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

No branches or pull requests

2 participants