I have two EClasses "Employee" and its subclass "PartTimeEmployee" in my metamodel. I am trying to specify a pattern which should only match for direct instances of Employee (and not for instances of the subclass).
The pattern below for example will match for PartTimeEmployee instances as well.
I know this is not really easy to use, but this is currently the only way to use it.
However, could you elaborate your use case why you need this functionality? We might be capable of suggesting an alternative approach here; or if the issue seems general, we might also update the query language/runtimes to support this use case as well.
I am using patterns to parse a graph with respect to a grammar. Each original grammar rule creates objects with specific types, so parsing a given graph with patterns must be specific on types as well. (if my grammar rule creates Employee, then I should exactly parse Employee and not some subtypes). This parser will be then used for model transformation, consistency checking etc.
Your solution is still a managable one with one additional pattern for each type. Thanks for that! Nevertheless, I'd be of course even more happy to hear about a new language feature addressing this issue in the future