Sparx Systems Forum
Enterprise Architect => Bugs and Issues => Topic started by: nilspc on May 09, 2023, 08:51:27 pm
-
Hi,
Upgraded to v16.1 and discovered that one of our queries no longer work
this query works in 16.0
select f.ea_guid,c.ea_guid,f.name, c.name
from t_xref as a, t_connector as b, t_object as c, t_object as f, t_objectproperties as tag2
where a.behavior = 'conveyed'
and a.Description LIKE '%'+c.ea_guid+'%'
and a.client = b.ea_guid
and b.Start_Object_ID = f.Object_ID
and f.Object_ID = tag2.Object_ID and tag2.Property = 'ID'
By working I mean that it returns values in all 4 columns.
In 16.1 column 1 and 3 are blank.
I discovered the problem when running one of our script but the query builder have the same behavior.
And the problem occurs both in a repository in an sqlserver or a local qeax file
Anyone seen something like this? is the something I am missing?
Regards
Nils
-
You have name and ea_guid twice. Use an alias for the second Name
I would also suggest to rewrite your queries using the proper join syntax and use meaningful aliases for your tables.
That makes reading (and editing) queries that much easier.
select f.ea_guid as StartGUID ,o.ea_guid as ConveyedGUID, f.name as StartObject, o.name as ConveyedObject
from ((((t_connector c
inner join t_xref x on (x.client = c.ea_guid
and x.behavior = 'conveyed'))
inner join t_object o on x.Description LIKE '%'+o.ea_guid+'%')
inner join t_object f on c.Start_Object_ID = f.Object_ID)
left join t_objectproperties tv on (f.Object_ID = tv.Object_ID
and tv.Property = 'ID'))
Geert
-
Hi,
Thank you for a very quick response
Upgraded to 16.1 again and it now works :D
Strange though that it worked in 15.2 and 16.0
Regards
Nils
-
Strange though that it worked in 15.2 and 16.0
The problem is that you also changed either the database or the connection method. The "native" connections and .qea files both work with a different database layer.