Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: Thomas Mercer-Hursh on October 26, 2006, 02:58:43 pm

Title: <table> to class
Post by: Thomas Mercer-Hursh on October 26, 2006, 02:58:43 pm
After poking at EA off and on for a little while, I am now ready to tackle some real work.  In the first project I have imported the schema of an existing database to create a bunch of <table>s under the database in Component Models.  I would now like to select individual <table>s and create an equivalent regular class so that I can supplement the data with behavior and add in the classes which will not be persisted.  It seems like one should be able to do this and to create a link so that one will know that one is the expression of the other, but I'm not finding a procedure or tool that does this.  Am I missing something?  Where else should I look?
Title: Re: <table> to class
Post by: Eve on October 26, 2006, 03:47:50 pm
Have a look at the transformation support in EA. (http://www.sparxsystems.com/EAUserGuide/index.html?mdastyletransforms.htm)

There currently isn't a built-in transformation to do what you want.  A simple tranformation would copy everything except for the stereotype and language.  To do this create a new transformation and edit the default class template by adding "stereotype" and "language" to the TRANSFORM_CURRENT macro. (http://www.sparxsystems.com/EAUserGuide/index.html?transformingduplicateinforma.htm)

From there you'll also want to ignore all operations, remove stereotypes from attributes and associations and do some type mapping.