Finessing the Model

It is imperative that even at this stage, the model is slick enough so that it allows us to do what we want.

It is useless being half way through a project and discovering that we have to adjust the model to perform a task such as object deletion.

Setting the Delete Rules

In the last testing exercise, we discovered that we are not allowed to delete a Forum, otherwise it would leave Topics orphaned. But in an Online Forum, a moderator would want to have the ability to delete Forums.

The way to do this is by setting a Delete Rule on the Forum.topics relationship. Select the relationship in EOModeler and open the Advanced Entity Inspector.

Then select Cascade as the Delete Rule, as in Figure 8.10.

Figure 8.10. Setting the Delete ...

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.