-
-
Notifications
You must be signed in to change notification settings - Fork 370
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
PostgreSQL: Error 42P10 - there is no unique or exclusion constraint matching the ON CONFLIC #1023
Comments
Thanks, would you care to share it as a PR? |
Yes, you can use this code in a blazorboilerplate project. ` namespace BlazorBoilerplate.Storage
}` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello
To avoid this error in Postgres add unique index to the table PluralTranslation in LocalizationDbContext.cs:
builder.Entity().HasIndex(e => new { e.LocalizationRecordId, e.Index }, "IX_LOCRECID_INDEX").IsUnique();
Else this row will be generate error 42P10 :
localization DbContext.Plural Translations.UpsertRange(plural Translations).On(l => new { l.Localization RecordId, l.Index }).RunAsync();
The text was updated successfully, but these errors were encountered: