Sparx Systems Forum

Enterprise Architect => Bugs and Issues => Topic started by: Geert Bellekens on March 25, 2020, 06:40:19 pm

Title: {Element.BaseClasses} doesn't work anymore
Post 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
Title: Re: {Element.BaseClasses} doesn't work anymore
Post by: mhoppen on October 22, 2020, 07:11:43 pm
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 :-)
Title: Re: {Element.BaseClasses} doesn't work anymore
Post by: Geert Bellekens on October 22, 2020, 08:26:09 pm
SQL fragment with the following query:

Code: [Select]
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.
Title: Re: {Element.BaseClasses} doesn't work anymore
Post by: mhoppen on October 23, 2020, 12:55:33 am
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:
Code: [Select]
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#
Title: Re: {Element.BaseClasses} doesn't work anymore
Post by: Geert Bellekens on October 23, 2020, 01:22:59 am
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:
Code: [Select]
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