Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Questions about Extending OrganizationUnit #4355


User avatar
0
joe704la created

I saw the note in the documentation below but I didn't really understand what to do with the OnModelCreating. The link provided didn't really help. I tried a few things and I got it to work just fine as a discriminator. But I don't really want it as an entire different object. I would like to just add 1 column basically to the OrganizationUnit. Any help would be greatly appreciated.

A NOTE ABOUT EF CORE 2.0 In EntityFramework Core 2.0, OnModelCrreating must be used to configure extended entity if base entity contains a self reference (see <a class="postlink" href="https://github.com/aspnet/EntityFrameworkCore/issues/9704">https://github.com/aspnet/EntityFramewo ... ssues/9704</a>). An example of this case is extending OrganizationUnit entity.


3 Answer(s)
  • User Avatar
    0
    aaron created
    Support Team

    But I don't really want it as an entire different object. I would like to just add 1 column basically to the OrganizationUnit.

    That's not possible. What's wrong with having a different object?

    I saw the note in the documentation below but I didn't really understand what to do with the OnModelCreating.

    That's no longer necessary as of ABP v3.2.0. I just created a PR to remove that note.

  • User Avatar
    0
    joe704la created

    There is nothing necessarily wrong with it. I just only have a need for 1 type of OrganizationUnit and all I want to do is add 1 column.

  • User Avatar
    0
    aaron created
    Support Team

    When you add a column, it's no longer the original OrganizationUnit.