Open Closed

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


User avatar
0
yilmaz.atalar created
  • 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 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share the full code to reproduce this problem?

  • User Avatar
    0
    yilmaz.atalar created

    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 created
    Support Team Director

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

  • User Avatar
    0
    berkansasmaz created
    Support Team .NET Developer

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

  • User Avatar
    0
    berkansasmaz created
    Support Team .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 v9.1.0-preview. Updated on December 13, 2024, 06:09