Author Topic: Can you make an SQL query refer to the ModelView in which it is used?  (Read 7275 times)

miksko

  • EA User
  • **
  • Posts: 56
  • Karma: +2/-0
    • View Profile
I'm creating a ModelView to list all the packages on the next level of a package, like in the example below. My main reason for doing so, instead of creating a diagram manually, is that:
1. the list will be updated dynamically
2. I will be able to sort the list alphabetically.

I have no problems with creating an SQL query to populate the list. But I don't want to use a static where-clause like t_package.ea_guid = '{92A223AE-7CAE-4bd5-8CEF-BE0745E0FB35}'

Instead I want the ModelView element to dynamically reference to the package where it resides. Something like: t_package.ea_guid = self.ea_guid

Is that possible?

EXAMPLE
Package
  - ModelView
  Sub-package 1
  Sub-package 2
  Sub-package 3