我有两个类。 class1 的一个属性连接到 class2 的另一个属性。这是在一个类附近的连接器的上下文菜单的帮助下完成的,它被称为链接到元素功能。在连接器的另一侧执行相同的操作以选择其他类的其他属性。因此连接器直接连接两个属性而不是类本身。我还没有找到存储此信息的表,因此我找不到适当的 SQL 来查找连接(或未连接)的属性。
最佳答案
这里是使用 Link to..
进行笔记的方式
- PDATA1 =“属性”
- PDATA2 = t_attribute.属性的 ID
- PDATA3 = 属性名称
- PDATA4 有"is"(我不记得它的用途,因此您可以忽略它
第一个 SQL:
SELECT PDATA2 FROM t_object WHERE Object_Type='Note' AND PDATA1 = 'Attribute'
将为您提供 ID。只需将其放入另一个 SQL 中即可:
SELECT * FROM t_attribute WHERE ID = (above SQL)
并且您有属性详细信息。或者,如果您想找到未映射的 ID,只需将第一个找到的 ID 与现有属性 ID 进行剖析即可。
对于使用 Link to...
的关联这有点棘手。首先,任何此类连接器都将相关信息存储在 t_connector.StyleEx
中。就像例如
LFEP={69A30E17-23AB-4641-9573-9BDBAA988D52}L;
LF<dir>P=<guid><pos>;
connector is attached to attribute/operation<dir>
= S or E meaning Start (source) or End (target)<guid>
= ea_guid oft_attribute
ort_operation
<pos>
is the edge (L or R) where the connector had been attached to in the moment when the link has been created. This is a superfluous information since the renderer will attach the link to whatever place is relevant.There can be one LFSP, one LFEP or both be present in one StyleEx property
(来 self 的《Inside》书)
现在您可以使用 SQL 或(我更喜欢的)一个小脚本来过滤该信息,因为执行复杂的 SQL 字符串操作不是我的专长。
关于SQL,链接到元素功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40083327/