Hello,
I'm in need of some assistance regarding a custom query for my document templates.
Context:
I have a model with use cases, requirements, user interface and a domain model. In the use case scenario's I use some of the classes from my domain model. I am currently working on a document template that shows the use case scenario's, related activity diagrams, related user interface (mockup), related requirements and the related classes from my domain model.
All is working fine except the related classes. I've created a custom query for the classes fragment:
SELECT DISTINCT t_object.Name as objectname, t_attributeconstraints.Constraint as consname, t_attribute.Name as attrname, t_attribute.Type as attrtype
FROM t_attributeconstraints RIGHT JOIN ((t_object INNER JOIN t_connector ON t_object.Object_ID = t_connector.End_Object_ID) INNER JOIN t_attribute ON t_object.Object_ID = t_attribute.Object_ID) ON t_attributeconstraints.ID = t_attribute.ID
WHERE (((t_connector.Start_Object_ID)=#OBJECTID#))
and t_object.object_type = 'Class'
When I generate the use case document this query gives me:
Class: Address
| Attribute | Type | Constraint |
| Postalcode | String6 | This is a constraint |
Class: Address
| Attribute | Type | Constraint |
| Land | String | |
Class: Address
| Attribute | Type | Constraint |
| City | String40 | This is a constraint 1 |
Class: Address
| Attribute | Type | Constraint |
| City | String40 | This is a constraint 2 |
Class: Person
| Attribute | Type | Constraint |
| Name | String40 | |
But wat I wanted was:
Class: Address
| Attribute | Type | Constraint |
| Postalcode | String6 | This is a constraint |
| Land | String | |
| City | String40 | This is a constraint 1 This is a constraint 2
|
Class: Person
| Attribute | Type | Constraint |
| Name | String40 | |
Does anyone have any suggestions on how I can generate the classes, attributes and constraints in such a way?