fix(dir): 🐛 convention-generated constraint name

This commit is contained in:
Collin M. Barrett 2021-11-18 12:11:43 -06:00
parent 85312ba4a0
commit 6bc2a44907

View file

@ -22,6 +22,13 @@ public virtual void Configure(EntityTypeBuilder<FilterListLanguage> builder)
builder.ToTable($"{nr.RewriteName(nameof(FilterListLanguage))}s");
builder.HasKey(fll => new { fll.FilterListId, fll.Iso6391 });
// TODO: why does the convention-generated ConstraintName end w/'language_temp_id' (fk_filter_list_languages_languages_language_temp_id)
builder.HasOne(fll => fll.Language)
.WithMany(l => l.FilterListLanguages)
.HasForeignKey(fll => fll.Iso6391)
.HasConstraintName("fk_filter_list_languages_languages_iso6391");
builder.HasDataJsonFile<FilterListLanguage>();
}
}