Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: zalbina on July 24, 2012, 06:22:46 pm
-
Hello,
Is it possible to build a SQL Query in order to change class attributes or stereotype of a class, save the query and use it after?
Thanks.
-
Yes it is.
The easiest is to execute it using some kind of generic SQL client.
You could also write a script that executes the sql statement using the undocumented operation EA.Repository.Execute
Geert
-
No, it isn't (if you mean EA's query builder). The query builder allows only for writing SELECT statements. If you want to use UPDATE you need to script that with the method mentioned by Geert.
You can read more about this subject in my book Inside EA.
q.
-
Please, more tips how to do it. I'm absolutely new in this area.
-
My tip is don't.
The function mentioned is undocumented because there is absolutely no support for using it. These guys are using it because they have both invested considerable time learning the ins and outs of EA and are willing to take the risks associated with using something unsupported that could potentially irreparably damage their model. In comparison you rate yourself as "absolutely new in this area".
-
As Simon states the DBMS alteration is not documented for good reason. However you can make alterations usng Automation Script. This is the recommended and documented option. See: http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/automation/automation_interface.html