Seitenbau/stu

Unique identifiers for generated foreign ref relation

kaulbersch opened this issue · 0 comments

Until now the method name of a foreign relation inside a generated reference class was created based on the foreign relation identifier only.
${foreignCol.relation.foreignName}
That could result in identical methodnames with identical signature, if multiple references of same type exist.

To avoid that problem the method (relation) name is now generated as tuple of foreign relation identifier and foreign relation identifier local name.
${foreignCol.relation.foreignName}_${foreignCol.relation.localName}

The fix works, but the "quality" of the created DSL is decreased.
QA.hasMembers(Mr.Tester) must now be referenced as QA.hasMembers_belongsTo(Mr.Tester).

The problem must be analysed and a better solution should be found.