Altering the Object Model and Database

Open the Forum.eomodeld file from the ForumTest project.

Select the Post.by attribute in EOModeler and reset the width to 10 from 50. Save your changes.

Synchronizing the Model and the Database

For minor changes like the one we've just made, EOModeler has a very convenient tool that allows us to update the database to reflect the changes made to the model.

This enables us to circumvent recreating the tables and the database every time a small change is made. Hence, you don't lose your data.

This tool has its limits, but it's excellent for minor alterations to a model.

Choose Model, Synchronize Schema from the menu.

This will open a panel such as the one in Figure 9.5.

Figure 9.5. Synchronize the Database ...

Get WebObjects® Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.