Book a Demo

Author Topic: Model Search : How display Package / Model Name  (Read 2227 times)

derekwallace

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Model Search : How display Package / Model Name
« on: August 28, 2012, 05:04:26 pm »
Hi,
When using Model Search i think it would be useful if the table of matches returned
1. the package name that the item was found it.
2. the root node package (model) that the item was found in.

This means i can search the entire EA project and then sort the returned information by one of the many root node models or by the package its contained in.


Is the above possible or planned?

Thx
Derek

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Model Search : How display Package / Model Nam
« Reply #1 on: August 28, 2012, 05:25:44 pm »
Derek,

I don't use the standard searches, instead I only use my own SQL Searches where I define which columns are being returned.
In all my searches I include up to three levels op owning packages just to get a idea of where the element is located.
This is an example of such an SQL Search:
Code: [Select]
select c.ea_guid as CLASSGUID,c.object_type as CLASSTYPE,c.name as Name, c.stereotype as Stereotype
,package.name as PackageName ,package_p1.name as PackageLevel1,package_p2.name as PackageLevel2
,package_p3.name as PackageLevel3
from t_object c
join t_package as package on (c.package_id = package.package_id)
left join t_package as package_p1 on (package_p1.package_id = package.parent_id)
left join t_package as package_p2 on (package_p2.package_id = package_p1.parent_id)
left join t_package as package_p3 on (package_p3.package_id = package_p2.parent_id)
where c.object_type in ('Class','Interface')
and c.name like '<Search Term>'
and c.stereotype not like 'table'

Geert

derekwallace

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Model Search : How display Package / Model Nam
« Reply #2 on: August 28, 2012, 05:59:25 pm »
Thx Geert.
It looks like ill have to create a number of SQL searches to allow other team members do simple searches.