Hey Schumann,

I think there's some logic that makes this happen.

In the workeffort\entitydef\entitymodel_view.xml we have a Parent defintion:

      <relation type="one-nofk" title="Parent" rel-entity-name="WorkEffort">         <key-map field-name="workEffortParentId" rel-field-name="workEffortId"/>
      </relation>

The code in ModelReader.java takes care of creating the reverse relation for Child automatically:

       // create the new relationship even if one exists so we can show what we are looking for in the info message        // don't do relationship to the same entity, unless title is "Parent", then do a "Child" automatically
       String title = modelRelation.getTitle();
       if (curModelEntity.getEntityName().equals(relatedEnt.getEntityName()) && "Parent".equals(title)) {
           title = "Child";
       }

Hope that helps,

Jason


On 17/12/2020 06:10, Schumann Ye wrote:
Dear all,

Does anyone have any idea where the Entity ChildWorkEffort comes from ( in what 
xml file it is defined ).

This question came across to me when I checked the file ProductionRun.java with 
the codes as follows:
productionRunRoutingTasks =
productionRun.getRelated("ChildWorkEffort", .....

Then I search of the definition file with the title equal to "Child" and 
rel-entity-name="WorkEffort" but could NOT find any match.

Can anyone help?

Mvh
Schumann


Get Outlook for Android<https://aka.ms/ghei36>

Reply via email to