Starts in:
1 DAY
21 HRS
13 MIN
52 SEC
Starts in:
1 D
21 H
13 M
52 S
Open Closed

How to have Required Navigation Properties with abp suite #723


User avatar
0
willignicolas@gmail.com created

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

  • ABP Framework version: v4.0.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Seperated (Angular): no
  1. I want to have a navigation property that is mandatory but I don't see any option on abp suite to specify it.

I can do it manually by delete the "?" (nullable) on the generate navigation property and pass this property in generate constructor but if I update my entity after the modification (to add another property) the navigation property is not nullable any more and is not present in the constructor.

  1. In the same subject if I add manually a navigation object property (Shopfloor) in addition of my navigation id property (ShopfloorId) on my entity when I make an update on abp suite this navigation object is deleted.

You can see the 2 problems on this screen:

Thanks for your help. Nicolas.


5 Answer(s)
  • User Avatar
    0
    willignicolas@gmail.com created

    Hello,

    Have any ideas about these two issues?

    As a reminder :

    1. How to specify a mandatory association with abp suite? Because if we do it manually, updating an abp suite entity will cancel our changes.

    2. If we add an object or list navigation property to an entity, when it is updated, the manually added properties disappear.

    Thank you in advance for your answers. Nicolas

  • User Avatar
    0
    alper created
    Support Team Director

    1- I want to have a navigation property that is mandatory but I don't see any option on abp suite to specify it.

    This is not supported for now but it's on the roadmap (probably in v4.2). for now you can do it manually.

    In the same subject if I add manually a navigation object property (Shopfloor) in addition of my navigation id property (ShopfloorId) on my entity when I make an update on abp suite this navigation object is deleted.

    Suite overwrite all its own created files. So when you edit a Suite generated file, it will be overwritten if you generate the same entity.

  • User Avatar
    0
    willignicolas@gmail.com created

    @alper OK great.

    Thanks for this answer.

    Happy holydays.

  • User Avatar
    0
    learnabp created

    Has this been implemented .... or still on the roadmap this feature is not in 4.2 as I am using it

  • User Avatar
    0
    alper created
    Support Team Director

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