The Enterprise Architect model repository is a database. Databases can be easily queried with SQL. This results in a wealth of possibilities. A minor problem is recursions! See this blog article.
The structure in the ProjectBrowser – the model tree – corresponds to a parentID, which is stored in the line of the child. To create a recursive query here, we need recursive SQL, which supports some databases.