Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: marku on April 21, 2020, 06:15:54 am

Title: Relationship Matrix with my own "model search" as source & target - doesn't work
Post by: marku on April 21, 2020, 06:15:54 am
Hi
In "Find in project window" I was doing 2 simple query ( using SQL scratch pad/SQL editor)
When I use one of them in "Find in Project" ( as "My searches") - a have correct answer (list of elements)
In "Relationship Matrix" I need use them as a "Source" and "Target" (using Apply model search)- but unfortunetly dosen't work- all of them are empty (no object as source, or target)
When I change it on the difrent "my search" ( build in the same "SQL scratch pad") it work ok.
Can someone tell me why?
- I check in Matrix "options" and select "all" as "perspective"
1 query:
select name, object_type, stereotype, ea_guid
from t_object, t_diagramobjects
where t_object.Object_ID = t_diagramobjects.Object_ID
and t_object.Stereotype = 'ArchiMate_ApplicationService'
and t_diagramobjects.Diagram_ID = 14515

2:
select name, object_type, stereotype, ea_guid, ParentID
from t_object
where t_object.Stereotype like '%<Search Term>%'
and t_object.Package_ID = 11289;
 
Title: Re: Relationship Matrix with my own "model search" as source & target - doesn't work
Post by: Geert Bellekens on April 21, 2020, 03:21:52 pm
A typical search would need to include CLASSGUID and CLASSTYPE

Code: [Select]
select o.ea_guid AS GLASSGUID, o.Object_Type AS CLASSTYPE, o.Name from t_object o
Also make sure to set "AS CLASSGUID" and "AS CLASSTYPE" in all caps at it matters in some circumstances (I don't remember which exactly)

Geert
Title: Re: Relationship Matrix with my own "model search" as source & target - doesn't work
Post by: marku on April 21, 2020, 06:23:54 pm
Thx !
It's work! in 100%

P.S.
I find also few new information here:
https://sparxsystems.com/enterprise_architect_user_guide/14.0/model_navigation/creating_filters.html