Sparx Systems Forum
Enterprise Architect => Bugs and Issues => Topic started by: Geert Bellekens on March 25, 2020, 06:40:19 pm
-
After upgrading to version 15.1.1527 we noticed that the field {Element.BaseClasses} used in our RTF templates doesn't work anymore. It remains empty.
Als a workaround I'm going to add an SQL template fragment to replace this field.
Reported
Geert
-
This seems to be still broken in Enterprise Architect 15.2 Build 1554 (Released 28-Aug-2020), right?
Can you tell me how to use your suggested workaround?
Thanks :-)
-
SQL fragment with the following query:
select top 1 op.Name as Base from t_object o
inner join t_connector c on c.Start_Object_ID = o.Object_ID
and c.Connector_Type in ('Generalization', 'Generalisation')
inner join t_object op on op.Object_ID = c.End_Object_ID
where o.Object_ID = #OBJECTID#
Custom field {Base} replaces {Element.BaseClasses}
Geert
PS. I added a top1 because we don't use multiple inheritance.
-
Thank you. First, I had to learn how to use these fragments and custom SQL. However, your code seems to have a little issue that I could resolve by adding some brackets:
select top 1 op.Name as Base from
(t_object o inner join t_connector c on (c.Start_Object_ID = o.Object_ID and c.Connector_Type in ('Generalization', 'Generalisation')))
inner join t_object op on op.Object_ID = c.End_Object_ID
where o.Object_ID = #OBJECTID#
-
Thank you. First, I had to learn how to use these fragments and custom SQL. However, your code seems to have a little issue that I could resolve by adding some brackets:
select top 1 op.Name as Base from
(t_object o inner join t_connector c on (c.Start_Object_ID = o.Object_ID and c.Connector_Type in ('Generalization', 'Generalisation')))
inner join t_object op on op.Object_ID = c.End_Object_ID
where o.Object_ID = #OBJECTID#
Yeah, mine was written for SQL Server.
Access SQL requires a bunch of parentheses
Geert