Eclipse EMF: updating the Model

Now we will see how to handle a Model update.
Let’s say we want to add the “surname” attribute to Author entity.

Open the model diagram (Library.ecorediag) and add the new attribute

still of EString type

Save the changes (Ctrl-S), re-open file Library.genmodel, and re-generate the sources for the following plug-ins: Model, Edit and Editor (remember to click on each of the first three context-menu items)

Re-launch the application (doing a  Clean and checking the launch, in case of errors)

 

If you check the database now, you’ll find that table “author” has a new “surname” field, which the application can handle immediately

 

Back to index

 

By | 2012-06-08T11:29:09+00:00 September 17th, 2011|Articoli, Tutorials EMF, GMF, CDO|0 Comments

About the Author:

Leave A Comment

This Is A Custom Widget

This Sliding Bar can be switched on or off in theme options, and can take any widget you throw at it or even fill it with your custom HTML Code. Its perfect for grabbing the attention of your viewers. Choose between 1, 2, 3 or 4 columns, set the background color, widget divider color, activate transparency, a top border or fully disable it on desktop and mobile.

This Is A Custom Widget

This Sliding Bar can be switched on or off in theme options, and can take any widget you throw at it or even fill it with your custom HTML Code. Its perfect for grabbing the attention of your viewers. Choose between 1, 2, 3 or 4 columns, set the background color, widget divider color, activate transparency, a top border or fully disable it on desktop and mobile.