Open Closed

Organization unit entity as foreign key into new table #4811


User avatar
0
moinahmed created

I'm trying to create a new entity (Department) as follows: Entity name: Department

| Name | DataType | Remarks | | ---- | -------- | ------- | | Id | Uniqueidentifier | Primary Key | | Name | NVarchar(255) | Department name | | OrganizationUnitId (FK) | UniqueIdentifier | Foreign key from OrganizationUnit entity |

How can I achieve this? Also, how to add Collection property (Departments) in OrganizationUnity entity?

Thanks, Moin


2 Answer(s)
  • User Avatar
    0
    moinahmed created

    The actual ask is I'd like to extend IdentiyUser model to add departments functionality just as we have for roles in the same table. I need a collection out there with all CRUD methods.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    How can I achieve this?

    You can try this:

    how to add Collection property (Departments) in OrganizationUnity entity?

    The OrganizationUnity is built in the identity module, you can't add a Collection property in it.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 18, 2025, 07:10