Book a Demo

Author Topic: Matrix with model search  (Read 6273 times)

Hurra

  • EA User
  • **
  • Posts: 184
  • Karma: +0/-0
    • View Profile
    • Find me at LinkedIn!
Matrix with model search
« on: February 06, 2019, 01:19:42 am »
Hi!

I have some problems creating a matrix with a model search.

It works with some searches, not at all with others.

Simple search which DOESN't work:

Code: [Select]
select objekt.ea_guid as CLASSGUID, objekt.Object_Type as CLASSTYPE, objekt.Name as objektName, objekt.Object_ID as oID

from t_object objekt
inner join t_object parent on objekt.ParentID = parent.Object_ID

where parent.ea_guid = '<Search Term>'

Search which DO work:

Code: [Select]
SELECT interface.ea_guid AS CLASSGUID, interface.Object_Type AS CLASSTYPE, interface.Name AS Name

FROM t_object  interface
INNER JOIN t_object port ON port.PDATA1 = interface.ea_guid
INNER JOIN t_object s ON s.Object_ID = port.parentID

WHERE port.Object_Type = 'Port'
AND s.ea_guid = '<Search Term>'

Does someone know why some searches work and some do not?

Thanks!
always learning!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Matrix with model search
« Reply #1 on: February 06, 2019, 02:02:32 am »
objekt.ParentID


q.

Hurra

  • EA User
  • **
  • Posts: 184
  • Karma: +0/-0
    • View Profile
    • Find me at LinkedIn!
Re: Matrix with model search
« Reply #2 on: February 06, 2019, 02:20:27 am »
objekt.ParentID


q.

?

The searches works in the 'Find in Project' tab.
always learning!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Matrix with model search
« Reply #3 on: February 06, 2019, 02:42:37 am »
Ah, forget it. I got confused with your German writing of Object.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Matrix with model search
« Reply #4 on: February 06, 2019, 05:47:33 pm »
"AS" vs "as"

For some reason EA sometimes cares about the capitalization of the AS keyword.

Geert

Hurra

  • EA User
  • **
  • Posts: 184
  • Karma: +0/-0
    • View Profile
    • Find me at LinkedIn!
Re: Matrix with model search
« Reply #5 on: February 06, 2019, 07:15:15 pm »
Ah, forget it. I got confused with your German writing of Object.

q.

It's swedish :(
always learning!

Hurra

  • EA User
  • **
  • Posts: 184
  • Karma: +0/-0
    • View Profile
    • Find me at LinkedIn!
Re: Matrix with model search
« Reply #6 on: February 06, 2019, 07:19:26 pm »
"AS" vs "as"

For some reason EA sometimes cares about the capitalization of the AS keyword.

Geert

wow...

Thank you  ::)

Now that I see the elements I realized I have another problem.

All the connectors are through ports. Therefore my matrix is empty because I do not have connectors from element to element, only port to port. Can I solve this somehow? Or do I just have to give up the idea of a matrix?  :D
always learning!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Matrix with model search
« Reply #7 on: February 06, 2019, 07:26:09 pm »
Technically ports are elements too, but I don't know if you can use them as such in the relationship matrix.

If not then I would contact sparx support.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Matrix with model search
« Reply #8 on: February 06, 2019, 10:18:11 pm »
It's swedish :(

Let's agree on Northern Europe Post Brexit.

q.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Matrix with model search
« Reply #9 on: February 06, 2019, 10:43:26 pm »
Regarding the ports/interfaces you will need to use indirect access. That is something like "where parent is port and parent-parent is element". I'm no SQL nerd, so you have to do the coding on your own, but it's probably feasible.

q.