Book a Demo

Author Topic: Query works in 16.0 but stops working 16.1  (Read 4561 times)

nilspc

  • EA User
  • **
  • Posts: 29
  • Karma: +1/-0
    • View Profile
Query works in 16.0 but stops working 16.1
« 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

Code: [Select]
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

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13471
  • Karma: +571/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Query works in 16.0 but stops working 16.1
« Reply #1 on: May 09, 2023, 09:05:23 pm »
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.

Code: [Select]
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

nilspc

  • EA User
  • **
  • Posts: 29
  • Karma: +1/-0
    • View Profile
Re: Query works in 16.0 but stops working 16.1
« Reply #2 on: May 09, 2023, 09:20:00 pm »
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

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8090
  • Karma: +118/-20
    • View Profile
Re: Query works in 16.0 but stops working 16.1
« Reply #3 on: May 10, 2023, 08:12:18 am »
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.