Hello,
When I creating a Child Entityās Child Entity in ABP Studio, I can select another Child Entity as the Master Entity for the new table. However, after clicking Save and Generation, the generated code throws an error.
The issue is that the generated Master Entity .cs file does not include a navigation property for the newly created table. As a result, when establishing the one-to-many relationship in DbContext, it fails due to the missing reference.
To resolve this, I have to manually add the navigation property in the Master Entity's extended file.
My question is: Does ABP Studio not support creating a Child Entityās Child Entity by default? Or is there something I can do to prevent this issue from occurring?
- I can select another Child Entity as the Master Entity for the new table.

- The Master Entityās .cs file does not include a navigation property for the new table.

- Causing DbContext to fail when establishing the one-to-many relationship.

- I need to manually add the navigation property in Master Entity's Extended file.

7 Answer(s)
-
0Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
-
0
Hi,
Unfortunately I couldn't reproduce the exact same issue.
Here some of questions to determine problem properly:
Hi
My ABP Studio and ABP Versions
My Case
I want to create a four-layer Master-Detail relationship.
- Creating the second-layer entity was successful since it's a typical case in the ABP documentation.
- However, when I tried to create the third-layer entity, the .cs file of the second-layer entity did not include a navigation property for the new table.
- In this case, the third-layer entity's master entity is the second-layer entity, while the second-layer entity is also a child entity itself.
Manually Adding Navigation in the Navigations Tab I tried to manually add the navigation property in the Navigations tab, but it showed an error message: "The master entity can not be same with the navigation property."
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
I delivered your report to the ABP Suite team currently,
They'll investigate and fix it.
Ok Thank you!
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
I delivered your report to the ABP Suite team currently,
They'll investigate and fix it.
Hi,
Iād like to know if you are able to reproduce this issue. I want to confirm whether others might encounter the same problem as well.
Thanks!
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)






