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>'