GeertBellekens / Enterprise-Architect-Toolpack

Addins and tools for Sparx Systems Enterprise Architect
https://bellekens.com/product/bellekens-enterprise-architect-toolpack/
BSD 2-Clause "Simplified" License
97 stars 39 forks source link

Mapping: Join expression not supported #111

Closed robvadai closed 3 years ago

robvadai commented 3 years ago

Symptoms:

  1. Select the UML class from the Project view
  2. Go to Specialize/Add-Ins/EA Mapping/Map
  3. Click on any of the Source Model items (table or attributes)
  4. Warning dialog shows

Warning dialog content:

DAO.Database [0x000000ce0]

Join expression not supported

This is when my target is a custom database driver (ie. not a built-in database like Oracle etc).

I'm using EA Mapping version 2.3.5.23639

GeertBellekens commented 3 years ago

Hi Rob, on what type of repository is that? (.eap, SQL Server, MySQL,...). If you open %appdata%\Sparx Systems\EA\dberror.txt you can see which query exactly was the reason for the error

robvadai commented 3 years ago

Yes, thanks for the advise, error is here:

28/03/2021 16:13:14
DAO.Database [0x00000ce0]

Join expression not supported.

Context:
    SQL: select fis.Object_ID  from (((((t_object o  inner join t_connector tr on (tr.Start_Object_ID = o.Object_ID         and  tr.Connector_Type = 'Abstraction'         and tr.Stereotype = 'trace')) inner join t_object o2 on (o2.Object_ID = tr.End_Object_ID       and o2.Name = o.Name       and o2.Object_Type = o.Object_Type)) inner join t_connector rel1 on (rel1.Start_Object_ID = o2.Object_ID       and rel1.Connector_Type in ('Realization', 'Realisation'))) inner join t_connector rel2 on (rel2.Start_Object_ID = rel1.End_Object_ID       and rel2.Connector_Type in ('Realization', 'Realisation'))) inner join t_object fis on fis.Object_ID = rel2.End_Object_ID) where o.ea_guid = '{BA49A127-32AA-40b1-9529-3A090FE8A960}' union select fis.Object_ID  from (((t_object o  inner join t_connector rel1 on (rel1.Start_Object_ID = o.Object_ID       and rel1.Connector_Type in ('Realization', 'Realisation'))) inner join t_connector rel2 on (rel2.Start_Object_ID = rel1.End_Object_ID       and rel2.Connector_Type in ('Realization', 'Realisation'))) inner join t_object fis on fis.Object_ID = rel2.End_Object_ID) where o.ea_guid = '{BA49A127-32AA-40b1-9529-3A090FE8A960}'
GeertBellekens commented 3 years ago

I see. That query works on SQL server, but it might not on other repository types. You can change that query yourself in the settings: image If you are not using the contexts, you can change it to select 0 as test from t_object

robvadai commented 3 years ago

yes it's all good, thanks for the info

robvadai commented 3 years ago

What does this query is actually for?