Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何为多值属性生成代码?在我的元模型中,我有一个名为 A 的类,其名为 B 的属性是多值的。属性B的类型是C类。在建模中,我为属性B设置了两个值,例如C1和C2。现在,如何为 C1 和 C2 生成代码?(例如访问 C1 和 C2 的名称)
您可以尝试以下方法:
[for (e : C | A.B)] This B attribute has a name of: [e.name/] [/for]