Open Closed

Cannot include entities from ABP module when using dependent module #7326


User avatar
0
jan-niklas created

Provide us with the following info:

We are unable to create navigational properties using entities from ABP such as OrganizationUnit when using a module approach.

  • ABP Framework version: v8.2.0-rc.3
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Steps to reproduce the issue:

Using abp suite we have created the initial solution "SolutionA" and modules "ModuleA" and "ModuleB". We then added the three sln files to the abp suite dashboard. When creating entities and navigational properties in the "SolutionA" project we can successfully create relations to entities from abp modules. However this does not work in the "ModuleA" or "ModuleB".

As a workaround we were able to create dummy entities in "SolutionA" with the desired navigational properties, click "Save" and copy the relevant piece of text from the json source file for the given entity into the json source file of the entity in "ModuleA". The navigational property then gets correctly displayed in abp suite but the code generation does not work correctly for this entity (there is a missing import in the models.ts file for the given entity.


2 Answer(s)
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, sorry for the late response. I'll try your scenario and write you back asap.

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    When you select the "include entities from ABP modules" option, it scans the solution of the current module's assembly and then lists the related ABP modules' entities'. So, in your scenario, the dependent ABP modules' entities should only be shown in the options for your module project. This is by design. Please correct me if I misunderstood.

    Regards.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11