Eclipse EMF: updating the Model

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


2012-06-08T11:29:09+00:00By |

Leave A Comment