खुला हुआ बंद किया हुआ

Error on migrating database with an entity which has a navigation property to tenants #1003


User avatar
0
yilmaz.atalar बनाया था
  • ABP Framework version: v4.0
  • DB provider: EF Core

Hi,

I've added an entity to my context which has a navigation property to tenants table. Migration file's been created with success. But when I try to run DbMigrator app, it throws an exception like this:

And my entity's config is like this:

gl.HasOne(g => g.Tenant).WithMany().HasForeignKey(g => g.TenantId);

How can I solve this problem?

Thanks.

PS: Related with this post


5 उत्तर (ओं)
  • User Avatar
    0
    maliming बनाया था
    सहायता दल Fullstack Developer

    hi

    Can you share the full code to reproduce this problem?

  • User Avatar
    0
    yilmaz.atalar बनाया था

    Hi,

    I think the problem is clear and easy to reproduce. Also I've linked a related problem. I cannot share the source code. It's a corporate project and contains sensitive information.

    Thanks.

  • User Avatar
    0
    alper बनाया था
    सहायता दल Director

    hi, this maybe a issue. someone else also reported the same situation. I'll check it

  • User Avatar
    0
    berkansasmaz बनाया था
    सहायता दल .NET Developer

    I created an issue: https://github.com/abpframework/abp/issues/8019

  • User Avatar
    0
    berkansasmaz बनाया था
    सहायता दल .NET Developer

    You can find why the problem occurs and the solution here.

    So I am closing this ticket. You can re-open and add comment if you want.

Made with ❤️ on ABP v8.2.0-preview Updated on मार्च 25, 2024, 15:11