Book a Demo

Author Topic: Efficient way to get collection of association  (Read 2991 times)

sspvirgo

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Efficient way to get collection of association
« on: July 27, 2011, 02:03:44 am »
Hi,

Is there any way to get the collection of connectors that have the association relationship in an efficient manner without iterating through all the package elements and then iterating through all connectors of that element.
I am currently iterating through all elements in the package and getting the connectors by specifying its type as connectors.type = "Association".

Any suggestion.

Thanks & Regards,

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Efficient way to get collection of association
« Reply #1 on: July 27, 2011, 05:12:38 pm »
You have to use sql queries to efficiently get what you need from the model.
See the operation internal List<ConnectorWrapper> getRelationsByQuery(string SQLQuery) in  Model.cs for an example.

Geert