Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: ngchol on August 16, 2010, 09:40:53 pm
-
Hi all, this is my first post so sorry if I've missed the answer elsewhere...
I've created about 50 tables in a data model - they currently have no columns. Each table will contain a column called "<tablename> ID". Is there a macro I could easily create/run which could do this, or do I need to add each column manually?
-
Have you tried creating a superclass that contains this one column, and having all other tables specialize this one?
This might just give you the desired results.
Geert
-
Alternatively,
Since they are empty, why not delete the model, create a pseudo-table and then "Duplicate" it 50 times (its somewhere in the context menus).
Alternatively, as Geert suggests, use a more advanced rdms that supports inheritance.... (blatant plug for postgresql... (followed by blatant request that EA implement DDL generation that supports it!)).
<evil>hehehehehee</evil>
bruce
-
Just as another suggestion - Running the built-in DDL transformation should automatically generate a default Primary Key "ID" column for each table. The default format used for the column name is like "<TableName>ID". You could customize the name format if needed by editing the DDL Transformation templates (specifically, look at the Class template). Note: this process effectively creates an entire second copy of all your tables. The original elements will not be modified.