Book a Demo

Author Topic: {Element.BaseClasses} doesn't work anymore  (Read 9554 times)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
{Element.BaseClasses} doesn't work anymore
« 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

mhoppen

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: {Element.BaseClasses} doesn't work anymore
« Reply #1 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 :-)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: {Element.BaseClasses} doesn't work anymore
« Reply #2 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.

mhoppen

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: {Element.BaseClasses} doesn't work anymore
« Reply #3 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#

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: {Element.BaseClasses} doesn't work anymore
« Reply #4 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