代码之家  ›  专栏  ›  技术社区  ›  BIndu_Madhav

如何通过API提取应用于企业架构师需求工件的原理和问题

  •  0
  • BIndu_Madhav  · 技术社区  · 4 年前

    t\U对象 桌子。我要去别的桌子看看吗?请建议。

    enter image description here

    0 回复  |  直到 4 年前
        1
  •  1
  •   Geert Bellekens    4 年前

    EA.Elements (t\u对象)使用 EA.Connector (t\U连接器)

    foreach (EA.Connector connector in myRequirement.Connectors)
    {
        EA.Element otherElement;
        if (connector.ClientID != myRequirement.ElementID)
        {
            otherElement = myRepository.GetElementByID(connector.ClientID)
        }
        else
        {
            otherElement = myRepository.GetElementByID(connector.ClientID)
        }
        if (otherElement.Type == "Note")
        {
            return otherElement;
        }
    }
    

    在查询中,您可以这样做

    select note.* 
    from t_object o
    inner join t_connector c on o.Object_ID in (c.Start_Object_ID, c.End_Object_ID)
    inner join t_object note on note.Object_ID in (c.Start_Object_ID, c.End_Object_ID)
                                and note.Object_Type = 'Note'
    where o.ea_guid = '<myRequirementGUID>'