Book a Demo

Author Topic: how to search for 'instances' only?  (Read 2520 times)

volenin

  • EA User
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
how to search for 'instances' only?
« on: November 02, 2012, 03:43:28 am »
Hi. I'm trying to setup a search filter that will include only _instances_ of the entities (ie, Objects, Node Instance, Component Instance, etc), rather than 'prototypes'. Can't figure out which field to use for that.. Must be definitely doable through SQL...

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: how to search for 'instances' only?
« Reply #1 on: November 02, 2012, 04:24:56 am »
Not that easy. Classes appear as Object, Activities as Action with classifier, Nodes as Nodes with classifier. You need to construct a SQL like
Code: [Select]
SELECT * FROM t_object WHERE Object_Type = 'Object' OR (Object_Type in ('Node', 'Action') AND NOT Classifier_GUID IS NULL) You need to find out the rest of your element/object conditions.

q.

volenin

  • EA User
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: how to search for 'instances' only?
« Reply #2 on: November 02, 2012, 06:16:01 am »
Thanks, qwerty. Just figured it out. Once co-worker of mine mentioned that EAP files can be opened in the MS Access as a DB file, the rest was a breeze.

For anyone interested, here is the query that works with Relationship Matrix (to select instances of any object types):

SELECT ea_guid AS CLASSGUID, Object_Type AS CLASSTYPE, Name FROM t_object where classifier <> 0