Starts in:
1 DAY
7 HRS
0 MIN
7 SEC
Starts in:
1 D
7 H
0 M
7 S
Open Closed

Cannot add Navigation Property for IdentityUser #3618


User avatar
0
BradAdler created

ABP Framework version: v5.3.3 UI type: Blazor DB provider: EF Core Tiered (MVC) or Identity Server Separated (Angular): yes / no Exception message and stack trace: No message Steps to reproduce the issue:"

  1. Need to link the IdentityUser (AbpUsers) to an App{TableName}
  2. Used Abp Studio, Define a navigation property, see screen shot below.
  3. Note how the Collection Name field is blank. When this field is selected it only shows a list of App(TableName} tables, none of the Abp tables.
  4. Questions:
    1. What to do to show the App tables in the Collection Name field?
    2. Is this the correct approach or is there a different way of approaching this?

Note: Followed this approach: https://alexbierhaus.medium.com/abp-io-navigation-property-for-identityuser-abpuser-218b15aa711c

Cheers Brad


6 Answer(s)
  • User Avatar
    0
    yekalkan created
    Support Team Fullstack Developer

    Hi @BradAdler,

    Collection names filed doesn't exist in v5.3.3.

    I guess you need to type Users in Collection name filed.

  • User Avatar
    1
    BradAdler created

    @ykalkan hi. Thanks for the suggestions.

    Regarding:

    1. Collection names filed doesn't exist in v5.3.3.: The screen shot clearly shows the Collection Names field in the **Advanced **tab of the Define a navigation property.
    2. I guess you need to type Users in Collection name filed.: I tried this and Save/Generate failed too.

    I have included another screen shot showing how the Collection Names lookup only displays the App{tables} when I expect it to show the Abp{tables}. Note that I have already created a navigation from this table to existing App{tables}, so this navigation to the Identity User is the second navigation.

    I did test this using a very simple project and it worked.

    1. Create a project
    2. Added a table: TestTable
    3. Created the navigation to the Users/IdentityUser
    • When creating the navigation the Collection Names lookup displayed the Abp{Tables} and was able to select the Users entity.
    1. Suite generation process succeeded
    • This is what the navigation properties shows now.
    • Note how the Collection Names field disappeared and the Collection Name=Users, like you suggested
  • User Avatar
    0
    yekalkan created
    Support Team Fullstack Developer

    Hi @BradAdler,

    As i understand, you achieved the goal. Thank you fol the detailed explanation, that may be useful for other users.

  • User Avatar
    0
    BradAdler created

    @yekalkan hi.No the goal was not achieved. The simple example I tested worked, as described above. The more complex solution that we trying to build did not work per the original post.

  • User Avatar
    0
    yekalkan created
    Support Team Fullstack Developer

    @BradAdler

    Could you check the following question? That may help you.

    https://support.abp.io/QA/Questions/2954/Unable-To-Define-Many-To-Many-IdentityUser-Relationship

  • User Avatar
    0
    BradAdler created

    @yekalkan hi. The question won't work for me as:

    1. It uses coding when I am trying to work with the ABP suite
    2. It is a many-to-many relationship and need 1-to-many.

    I am going to try and replicate the problem using a simple project much like I did above (see 3 Sep 2022).

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06